Docker in DietPi

So I was trying to install docker in my raspberry pi with DietPi and initially installed it via repo/aptitude, but that version is pretty old and not supported anymore.

user@computer:$ dpkg -l | grep dock
ii 1.3.3~dfsg1-2 armhf Linux container runtime

user@computer:$ sudo docker version
Client version: 1.3.3
Client API version: 1.15
Go version (client): go1.3.2
Git commit (client): d344625
OS/Arch (client): linux/arm
Server version: 1.3.3
Server API version: 1.15
Go version (server): go1.3.2
Git commit (server): d344625

So with this version of docker gives an error when running a hello-world. So we need to install a newer version and we do this with a simple curl.

user@computer:$ curl -sSL | sh
# Executing docker install script, commit: 36b78b2
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "" | apt-key add -qq - >/dev/null
+ sh -c echo "deb [arch=armhf] jessie edge" > /etc/apt/sources.list.d/docker.list
+ [ raspbian = debian ]
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:24:32 2018
OS/Arch: linux/arm
Experimental: false
Orchestrator: swarm

Version: 18.05.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:20:36 2018
OS/Arch: linux/arm
Experimental: false
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to
for more information.

Now we can test the installation.

user@computer:$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
61ddb93a5f93: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest

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:

Hardware, OS and kernel version below.

user@computer:$ uname -a; lsb_release -a
Linux DietPi 4.4.11-v7+ #886 SMP Thu May 19 15:20:49 BST 2016 armv7l GNU/Linux
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

Leave a Reply

Your email address will not be published. Required fields are marked *

AlphaOmega Captcha Geographica  –  What City Do You See?

This site uses Akismet to reduce spam. Learn how your comment data is processed.