# Check if docker is installed
$ docker version
Client: Docker Engine - Community
Version: 20.10.7
...
# Check if docker is running
$ systemctl is-active docker
active
- If installation is needed, install docker enginer from here:
https://docs.docker.com/engine/install/ - If docker is not running, followin troubleshooting steps: https://docs.docker.com/engine/daemon/troubleshoot/
- Copy your ros package in ros-pkg folder
- (optional) rename
ros-pkg
. Ensure to renameros-pkg
in Dockerfile and compose.yml - Build and run using the command below
docker compose up --build
In a new terminal:
docker exec -it ros-pkg-container bash
roslaunch ...
- Stop container by
docker compose down
- Make changes
- Build and run again
docker compose up --build