Docker compose - joelimgu/autocab GitHub Wiki
What is docker compose?
It's just a way to configure the launch of our container, it replaces the dokcer run/start command with 50 parameters with a file called dokcer-compose.yml
Why?
To mount things automatically (USB devices, volumes, ...), even in the case of image updates.
How?
Go to he directory containing the docker-compose.yml file.
- Modify it if needed (usually not) to apply the config to you specific mahine (ex: usb device number, volume mount, ...).
- Run
docker compose up -d
(the -d runs the container in the background). - You can run
docker ps
(it lists all the running containers) to verify that its running and gets its ID. - Finally to enter the container, run
docker exec -ti ros-compose bash
this open an interactive sessions(-ti) of a bash terminal on the container named 'ros-compose'.
README!
Using this method is extremelly easy for the container to be replaced, the only thing that will be maintained if this happens are the files inside the volume. So if you need any additional packages in the image or some config it must be modified in the dockerfile and it be rebuilt and updated in the docker-hub repo and the docker-compose.