What is Docker?

Docker is an open-source project for automating the deployment of applications as portable, self-sufficient containers that can run on the cloud or on-premises. Docker works in collaboration with cloud, Linux, and Windows vendors, including Microsoft.

How to install Docker

With one of the latest releases of Docker, they added official support for Raspbian. You can now easily install Docker on your Raspberry Pi with one simple command.

curl -sSL https://get.docker.com | sh

After running this command Docker has been installed on your Raspberry Pi. You can verify your installation by running:

sudo docker ps

Add your user to the docker group (optional)

If you don’t want to run all your Docker commands with sudo, you can add your pi user to the docker group:

sudo usermod -aG docker pi

Run your first Docker image

To run your first container, run the hello-world image:

docker run hello-world

If the command succeeds you’ll see a Hello World message from the freshly started container. Now you have started your first Docker container!