Skip to content

tuw-robotics/docker

Repository files navigation

Docker Containers

This repository contains the Dockerfiles and according scripts for the tuw_docker images.

Containers

Check out the README.md for the container you are interested in. The base container is designed to work either for ROS1 or ROS2 and has some basic tools installed. Other containers are build with the base container.

robot System

Select your container you like to build and check the related Readme.md

ROS1_Bridge

The tuw-ros1-bridge container allows communication between ROS1 and ROS2 nodes using the messages defined in the tuw_msgs repository.

Useful commands and operations for Docker

The following commands are useful for the operation of Docker and are generally applicable.

Delete images

Delete a single image

To delete a image:

docker image rm <image_name>

Delete all images

To delete all images:

docker image rm -f $(docker images -a -q)

To deleate images with TAG

docker rmi $(docker images -f "dangling=true" -q)

Delete container

Delete a singe container

To delete a container run:

docker container rm <container_name>

When the container is still running stop the container before deleting:

docker container stop <container_name>

Alternatively the process of deleting can be forced:

docker container rm -f <container_name>

Delete all stopped containers

To delete all stopped containers:

docker container rm $(docker container ls -a -q -f status=exited)

Pushing an image to DockerHub

DockerHub is a registry for Docker images. Firstly, you need a DockerHub account (create the account in the DockerHub webinterface). Login to DockerHub in your shell:

docker login

Secondly, you need a repository in your DockerHub (create the repository in the DockerHub webinterface). Thirdly, you need to tag the image in order to push it to DockerHub:

docker tag <repository>:<image_tag> <dockerhub_account_name>/<dockerhub_repository_name>:<image_tag>

Note: the default repository is tuw_docker.

Then you can push the image to DockerHub:

docker push <dockerhub_account_name>/<dockerhub_repository_name>:<image_tag>

After the image has been pushed to DockerHub it can be pulled with:

docker pull <dockerhub_account_name>/<dockerhub_repository_name>:<image_tag>

Moving docker data container

sudo service docker stop
sudo vim /etc/docker/daemon.json 
{ 
   "data-root": "/path/to/your/docker" 
}
sudo rsync -aP /var/lib/docker/ /path/to/your/docker
sudo mv /var/lib/docker /var/lib/docker.old
sudo service docker start
# sudo rm -rf /var/lib/docker.old

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published