This page serves to document information relating to installing ROS1 noetic on Docker containers
More specifically, we want to install gestelt [Gestelt]https://github.com/Temasek-Dynamics/gestelt into Docker
Install ROS in Docker#
docker pull ros:noetic-robot
Launching the docker container with ROS#
We follow the following webpage: [ROS Noetic in Docker]https://discourse.openrobotics.org/t/running-ros-noetic-in-docker-a-practical-guide-for-simulation-and-teleoperation/42572
docker run -it --name ros_container --net=host --privileged osrf/ros:noetic-desktop-full bashInstall Gestelt in Container#
After we have installed both docker as well as ROS Noetic within the docker, we can now proceed to follow the instructions in [Gestelt]https://github.com/Temasek-Dynamics/gestelt
Pushing to Docker to share container#
So you can actually build your container and share it. There are 2 ways of doing it. One, you build your docker container and send the whole container. The other, you state your configuration, share it on github and others can clone your configuration and build it themselves.
Pushing to Docker for file sharing#
First you have to login to docker by doing
docker loginSometimes, you will have issues logging in with your credentials. In that case you can do the following:
sudo nano /etc/docker/daemon.jsoncopy the following into the json file
{ "dns": ["8.8.8.8", "8.8.4.4"]}sudo systemctl restart dockerThe above should work.
Once you are able to login, commit the file with the repo and tag.
docker commit ros_container2 gestelt_ros1:latest
docker tag gestelt_ros1:latest yourusername/gestelt_ros1:latestwhere ros_container2 is the name of your container and yourusername is the name of the docker login id. gestelt_ros1 is the name of the repo and latest is the tag name.
After which, you can push this to your docker account
docker push yourusername/gestelt_ros1:latestPulling containers from Docker for file sharing#
To pull containers from docker, simply run the following code
docker pull yourusername/gestelt_ros1:latestImportant commands in Docker#
To start a new container with ROS#
docker run -it --name ros_container --net=host --privileged osrf/ros:noetic-desktop-full bashTo start re-enter the ros_container#
docker start -ai ros_container2To delete a container#
docker rm ros_container2To attach to a running container#
docker exec -it ros_container2 bash