KevsRobots Learning Platform

Learn ROS with me

% complete

Reset my progress

Docker Install

Install and configure Docker

By ,    Minute


Screenshot of the imager tool

Get Docker

We will use Docker to manage our ROS environment. Docker enables us to run containers; each container is a separate environment and can contain its own files, and run its own processes. Containers are like lightweight Virtual Machines, without the need to emulate an entire computer.

To get the Docker installation script:

  • Get the install script - From the terminal, type:
curl -fsSL https://get.docker.com -o get-docker.sh
chmod +x get-docker.sh 

Remove any existing docker installation

If you want to remove any existing docker installations, do this step before installing docker.

  • Purge - From the terminal, type:
sudo apt-get purge docker-ce docker-ce-cli containerd.io -y

Install Docker

  • Run the script - From the terminal, type:
./get-docker.sh

Fix permissions

Docker can run commands from a regular user account, but first we need to add our user to the docker group

  • Let your user run docker commands - From the terminal, type:
sudo usermod -aG docker $USER

$USER is filled in automatically with the user account you created when setting up the Pi


  • Unmask docker- From the terminal, type:
sudo systemctl unmask docker

Docker Compose

The Docker install script also installs Docker Compose, which we’ll use to start our ROS container. It’s run as docker compose (with a space). Older guides use docker-compose with a hyphen, which was a separate program you no longer need.


  • Start docker - From the terminal, type:
sudo systemctl start docker

  • Reboot - Restart the Pi to implement the changes. From the terminal, type:
sudo init 6

Check your understanding

Quick quiz 1 of 2

Why add your user to the docker group?

Quick quiz 2 of 2

How is a Docker container different from a virtual machine?

You can use the arrows  ← → on your keyboard to navigate between lessons.


What are you looking for?
Watch Videos Get Ideas Learn Something Read a Review Read the Blog Search
... Z Z z