Skip to content

4. Docker

Alec Graves edited this page May 17, 2017 · 1 revision

The Bare Minimum

If using ubuntu

echo "alias docker='sudo docker'" >> ~/.bash_aliases

Start an interactive container for catkin-build

docker run -i -t \
-v ~/catkin-build:/root/ros/catkin_ws/src \
--name build0 ksuart/catkin-build:depends-ros /bin/bash

Start an old container in interactive mode

docker start -i build0

Other Useful Commands

Enter an active docker container from new terminal

docker exec -i -t <container_name> /bin/bash

docker exec -i -t <container_id> /bin/bash

View active containers

docker ps

View all containers

docker ps -a

View all containers and their sizes

docker ps -as

Remove a container permanently

docker rm <name>

docker rm <container_id>

Pull a specific image

(running a container will automatically pull the required image, so this is normally unnecessary)

docker pull ksuart/catkin-build

docker pull ksuart/catkin-build:depends-ros

View all images on device

docker images -a

Remove a specific image

docker rmi <image_id>