I will continue to refer to the OS as Raspbian because (1) that’s what they named it when first released and (2) it still says that on the operating sytem. Therefore the name has stuck and still sticks.
Here are the steps to install Docker and the Portainer container that provides your Docker installation with a simple, web-based dashboard.
Update 64-bit Raspbian:
sudo apt update && sudo apt upgrade -y
Install Docker from the Docker website:
curl -sSL https://get.docker.com | sh
pi account to the
docker user group so that you can execute docker commands without sudo:
sudo usermod -aG docker pi
Log back in and test Docker by installing and running the following container.
docker run hello-world
The container will run and tell you it was successful with additional information about Docker and its OS.
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
For more examples and ideas, visit:
To be honest, I haven’t tried the recommendation about running the Ubuntu container, as I don’t know if it there is an ARM Ubuntu container (there is ARM Ubuntu, however) and if it will select the right container if there is such a container.
Install the next two containers. The first is a very simple http container.
docker run -d -p 80:80 hypriot/rpi-busybox-httpd
Navigate to http://localhost with Chromium and you’ll see this:
Now add the dashboard container that implements Portainer for ARM.
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer:arm
Navigate to http://localhost:9000/ and create an admin password for the admin account. Once that is accomplished, you’ll see something very similar to this:
You’ll note that only two containers are listed, not three. That’s because earlier I removed the “Hello World” container. Here’s a detailed listing of the containers.
To manage any of the containers, you select that container’s checkbox. That enables all of the possible action buttons at the top of the page. Finally, here’s a check of the entire system.
The engine overview is a cleaner view of what you can get from the command line. It’s also a validation that the dashboard container is seeing everything it’s supposed to see.
If you want any container to restart after a re-boot, then you need to modify the container’s restart policy. Otherwise, on reboot, no containers are running. For example
docker update --restart=always [container ID]
where he container ID can be found with a
docker ps from the command line. You can set restart to always from the command line with the docker run command as well.
It’s a limitation to this application I don’t like. I’m looking for something more comprehensive, or else, (shudder) I fork the application and “fix” it myself.