July 14, 2019

Docker on Raspberry Pi

How to install Docker CE with docker-compose on a Raspberry Pi running Raspbian Buster

Docker on Raspberry Pi

So, trying to get Docker installed on a Raspberry Pi with all the bells and whistles like docker-compose is actually not very straight forward.

But, hey - the Docker Community is working on it:

...to name a few.

I am actively tracking this issue. The goal is for the community to get it to a point where one can simply run:

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

But this doesn't work today. There's just too much up in the air when it comes to Docker development and Raspberry Pis.

curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: 36b78b2

Either your platform is not easily detectable or is not supported by this
installer script.
Please visit the following URL for more detailed installation instructions:

https://docs.docker.com/engine/installation/

Just to give an example, here is a table decribing compatability as of 15 days ago... (which means it's possible it's already out of date)

Docker Raspberry Pi Compatability Table:

result docker-ce package raspbian device issue/reason
works 18.09.0~3-0~raspbian-stretch stretch pi3
fails 18.09.0~3-0~raspbian-stretch stretch pi0 #681
works 18.06.1~ce~3-0~raspbian stretch pi3
works 18.06.1~ce~3-0~raspbian stretch pi0
works 18.09.0~3-0~raspbian-stretch buster pi3
fails 18.09.0~3-0~raspbian-stretch buster pi0 illegal instruction
fails 18.06.1~ce~3-0~raspbian buster pi3 #545

So with that said - I've tested this guide for Raspberry Pi 3 A+ and Raspberry Pi 3 B using Rasbian Buster.

If you have a different model Raspberru Pi, I reccomend a little research before just trying different methods of installing. Also, keep in mind that container.io doesn't work in Buster on the Zero right now.

When everything smooths out - I'll update this blog post (And probably the post photograph also)


Installation

Feel free to check out this Github Issue for a better way to do this. As of today, this is the best way I have figured out.

  1. First, make a place where you can download the Debian packages.
  2. Download the most recent .deb files for containerd.io, docker-ce-cli and docker-ce from https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/
  3. Install them in that order
  4. Add the current user to the docker group
  5. Reboot
    (for logging out, and to bring the dockerd up because it complains during the docker_ce installation - rebooting brings it up just fine)
  6. cd back to where you downloaded your Debian packages.
  7. Install docker-compose
  8. Re-install containerd.io, docker-ce-cli and docker-ce (Because the dependencies that come with docker-compose some how foobar things...) - simply reinstalling the downloaded .deb packages again worked for me (I know, I cringe here too...)
  9. Reboot again
  10. Done.
mkdir -p ~/Documents/Toolkit/Docker
cd ~/Documents/Toolkit/Docker
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/containerd.io_1.2.6-3_armhf.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce-cli_18.09.7\~3-0\~debian-buster_armhf.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce_18.09.7\~3-0\~debian-buster_armhf.deb
sudo dpkg -i containerd.io_1.2.6-3_armhf.deb
sudo dpkg -i docker-ce-cli_18.09.7\~3-0\~debian-buster_armhf.deb
sudo dpkg -i docker-ce_18.09.7\~3-0\~debian-buster_armhf.deb
sudo usermod -a -G docker $USER
sudo reboot
### after logging back in ###
cd ~/Documents/Toolkit/Docker
sudo apt install docker-compose
sudo dpkg -i containerd.io_1.2.6-3_armhf.deb
sudo dpkg -i docker-ce-cli_18.09.7\~3-0\~debian-buster_armhf.deb
sudo dpkg -i docker-ce_18.09.7\~3-0\~debian-buster_armhf.deb
sudo reboot

Here is what it would look like all executed together:

mkdir -p ~/Documents/Toolkit/Docker
cd ~/Documents/Toolkit/Docker
pwd
/home/jeremy/Documents/Toolkit/Docker
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/containerd.io_1.2.6-3_armhf.deb
--2019-07-14 17:01:01--  https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/containerd.io_1.2.6-3_armhf.deb
Resolving download.docker.com (download.docker.com)... 13.224.215.23, 13.224.215.49, 13.224.215.60, ...
Connecting to download.docker.com (download.docker.com)|13.224.215.23|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13025874 (12M) [binary/octet-stream]
Saving to: ‘containerd.io_1.2.6-3_armhf.deb’

containerd.io_1.2.6-3_armhf.deb     100%[==================================================================>]  12.42M  4.19MB/s    in 3.0s

2019-07-14 17:01:04 (4.19 MB/s) - ‘containerd.io_1.2.6-3_armhf.deb’ saved [13025874/13025874]

wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce-cli_18.09.7\~3-0\~debian-buster_armhf.deb
--2019-07-14 17:01:15--  https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb
Resolving download.docker.com (download.docker.com)... 13.224.215.23, 13.224.215.49, 13.224.215.60, ...
Connecting to download.docker.com (download.docker.com)|13.224.215.23|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8110638 (7.7M) [binary/octet-stream]
Saving to: ‘docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb’

docker-ce-cli_18.09.7~3-0~debian-bu 100%[==================================================================>]   7.73M  5.01MB/s    in 1.5s

2019-07-14 17:01:16 (5.01 MB/s) - ‘docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb’ saved [8110638/8110638]

wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce_18.09.7\~3-0\~debian-buster_armhf.deb
--2019-07-14 17:01:26--  https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce_18.09.7~3-0~debian-buster_armhf.deb
Resolving download.docker.com (download.docker.com)... 13.224.215.72, 13.224.215.49, 13.224.215.60, ...
Connecting to download.docker.com (download.docker.com)|13.224.215.72|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10790506 (10M) [binary/octet-stream]
Saving to: ‘docker-ce_18.09.7~3-0~debian-buster_armhf.deb’

docker-ce_18.09.7~3-0~debian-buster 100%[==================================================================>]  10.29M  4.64MB/s    in 2.2s

2019-07-14 17:01:29 (4.64 MB/s) - ‘docker-ce_18.09.7~3-0~debian-buster_armhf.deb’ saved [10790506/10790506]

ls -la
total 31196
drwxr-xr-x 2 jeremy jeremy     4096 Jul 14 17:01 .
drwxr-xr-x 4 jeremy jeremy     4096 Jul 14 17:00 ..
-rw-r--r-- 1 jeremy jeremy 13025874 Jun 27 15:28 containerd.io_1.2.6-3_armhf.deb
-rw-r--r-- 1 jeremy jeremy 10790506 Jun 27 15:28 docker-ce_18.09.7~3-0~debian-buster_armhf.deb
-rw-r--r-- 1 jeremy jeremy  8110638 Jun 27 15:28 docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb
sudo dpkg -i containerd.io_1.2.6-3_armhf.deb
Selecting previously unselected package containerd.io.
(Reading database ... 40007 files and directories currently installed.)
Preparing to unpack containerd.io_1.2.6-3_armhf.deb ...
Unpacking containerd.io (1.2.6-3) ...
Setting up containerd.io (1.2.6-3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
sudo dpkg -i docker-ce-cli_18.09.7\~3-0\~debian-buster_armhf.deb
Selecting previously unselected package docker-ce-cli.
(Reading database ... 40017 files and directories currently installed.)
Preparing to unpack docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb ...
Unpacking docker-ce-cli (5:18.09.7~3-0~debian-buster) ...
Setting up docker-ce-cli (5:18.09.7~3-0~debian-buster) ...
Processing triggers for man-db (2.8.5-2) ...
sudo dpkg -i docker-ce_18.09.7\~3-0\~debian-buster_armhf.deb
Selecting previously unselected package docker-ce.
(Reading database ... 40207 files and directories currently installed.)
Preparing to unpack docker-ce_18.09.7~3-0~debian-buster_armhf.deb ...
Unpacking docker-ce (5:18.09.7~3-0~debian-buster) ...
Setting up docker-ce (5:18.09.7~3-0~debian-buster) ...
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2019-07-14 17:02:54 EDT; 35ms ago
     Docs: https://docs.docker.com
  Process: 3308 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 3308 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce (--install):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (241-5+rpi1) ...
Errors were encountered while processing:
 docker-ce
docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 18:06:12 2019
 OS/Arch:           linux/arm
 Experimental:      false
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/version: dial unix /var/run/docker.sock: connect: permission denied
sudo usermod -a -G docker $USER                                                                                                                                        
sudo reboot
Connection to uberbuilder.local closed by remote host.
Connection to uberbuilder.local closed.

ssh uberbuilder.local
Linux uberbuilder 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jul 14 17:05:38 2019
docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 18:06:12 2019
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       2d0083d
  Built:            Thu Jun 27 17:24:12 2019
  OS/Arch:          linux/arm
  Experimental:     false
cd ~/Documents/Toolkit/Docker
sudo apt install docker-compose
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  golang-docker-credential-helpers libsecret-1-0 libsecret-common libyaml-0-2 python3-cached-property python3-distutils python3-docker
  python3-dockerpty python3-dockerpycreds python3-docopt python3-jsonschema python3-lib2to3 python3-texttable python3-websocket python3-yaml
Preparing to unpack .../12-python3-texttable_1.6.0-1_all.deb ...
Unpacking python3-texttable (1.6.0-1) ...
Selecting previously unselected package libyaml-0-2:armhf.
Preparing to unpack .../13-libyaml-0-2_0.2.1-1_armhf.deb ...
Unpacking libyaml-0-2:armhf (0.2.1-1) ...
Selecting previously unselected package python3-yaml.
Preparing to unpack .../14-python3-yaml_3.13-2_armhf.deb ...
Unpacking python3-yaml (3.13-2) ...
Selecting previously unselected package docker-compose.
Preparing to unpack .../15-docker-compose_1.21.0-3_all.deb ...
Unpacking docker-compose (1.21.0-3) ...
Setting up python3-cached-property (1.5.1-3) ...
Setting up python3-texttable (1.6.0-1) ...
Setting up python3-docopt (0.6.2-2) ...
Setting up libyaml-0-2:armhf (0.2.1-1) ...
Setting up python3-yaml (3.13-2) ...
Setting up python3-jsonschema (2.6.0-4) ...
update-alternatives: using /usr/bin/python3-jsonschema to provide /usr/bin/jsonschema (jsonschema) in auto mode
Setting up python3-lib2to3 (3.7.3-1) ...
Setting up python3-websocket (0.53.0-1) ...
update-alternatives: using /usr/bin/python3-wsdump to provide /usr/bin/wsdump (wsdump) in auto mode
Setting up libsecret-common (0.18.7-1) ...
Setting up python3-dockerpty (0.4.1-1) ...
Setting up python3-distutils (3.7.3-1) ...
Setting up libsecret-1-0:armhf (0.18.7-1) ...
Setting up golang-docker-credential-helpers (0.6.1-2) ...
Setting up python3-dockerpycreds (0.3.0-1) ...
Setting up python3-docker (3.4.1-4) ...
Setting up docker-compose (1.21.0-3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 18:06:12 2019
 OS/Arch:           linux/arm
 Experimental:      false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
sudo reboot
Connection to uberbuilder.local closed by remote host.
Connection to uberbuilder.local closed.

ssh uberbuilder.local
Linux uberbuilder 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jul 14 17:06:08 2019 from fe80::42e:1257:4433:696b%wlan0
docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 18:06:12 2019
 OS/Arch:           linux/arm
 Experimental:      false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
cd ~/Documents/Toolkit/Docker
sudo dpkg -i containerd.io_1.2.6-3_armhf.deb
Selecting previously unselected package containerd.io.
(Reading database ... 40727 files and directories currently installed.)
Preparing to unpack containerd.io_1.2.6-3_armhf.deb ...
Unpacking containerd.io (1.2.6-3) ...
Setting up containerd.io (1.2.6-3) ...
sudo dpkg -i docker-ce-cli_18.09.7\~3-0\~debian-buster_armhf.deb
(Reading database ... 40735 files and directories currently installed.)
Preparing to unpack docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb ...
Unpacking docker-ce-cli (5:18.09.7~3-0~debian-buster) over (5:18.09.7~3-0~debian-buster) ...
Setting up docker-ce-cli (5:18.09.7~3-0~debian-buster) ...
Processing triggers for man-db (2.8.5-2) ...
sudo dpkg -i docker-ce_18.09.7\~3-0\~debian-buster_armhf.deb
Selecting previously unselected package docker-ce.
(Reading database ... 40735 files and directories currently installed.)
Preparing to unpack docker-ce_18.09.7~3-0~debian-buster_armhf.deb ...
Unpacking docker-ce (5:18.09.7~3-0~debian-buster) ...
Setting up docker-ce (5:18.09.7~3-0~debian-buster) ...
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Processing triggers for systemd (241-5+rpi1) ...
docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 18:06:12 2019
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       2d0083d
  Built:            Thu Jun 27 17:24:12 2019
  OS/Arch:          linux/arm
  Experimental:     false
which docker-compose
/usr/bin/docker-compose
which docker
/usr/bin/docker

Note: In the above example, I ran a few extra non-needed commands to show that the docker-compose really does in fact foobar your docker installation. I didn't put them in the "do this" list because they aren't needed. So, don't let that throw you off - you don't need them, but I wanted to include them for information's sake.


Done

Congratulations. You have Docker installed and you're ready to move on with whatever you wanted to do with Docker.

If you want to read on about disk performance and testing... be my guest.


Test Driving Docker on your Raspberry Pi

Now, if you want - you can test it out.

Docker docker run --rm -it node bash
ping -c 3 8.8.8.8
exit
Docker docker run --rm -it node bash
Unable to find image 'node:latest' locally
latest: Pulling from library/node
162e276b1a29: Pull complete
052e82067950: Pull complete
4f5e84bede19: Pull complete
6a839ba8a519: Pull complete
4d85c23523be: Pull complete
6ecdfc845b08: Pull complete
b95b4f48a896: Pull complete
9a3069facbd1: Pull complete
df70056c400d: Pull complete
Digest: sha256:6e64f63a663a368cc81b28ed3c3e29e6b3784c04f0128be5aaa659157ed4d231
Status: Downloaded newer image for node:latest
root@c7786df259d0:/# ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=8.51 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=10.3 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=33.0 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 8.513/17.294/33.058/11.171 ms
root@c7786df259d0:/# exit
exit

Bro - Time to run node is 7:16.31

For what it's worth... I'm a bit dissapointed in the performance of Docker on my Raspberry Pi 3 B. For some reason it seems to run better on my Raspberry Pi 3 A+. Which might just be my imagination.

docker image rm node
time docker run --rm -it node /bin/sh -c "exit"
Unable to find image 'node:latest' locally
latest: Pulling from library/node
162e276b1a29: Pull complete
052e82067950: Pull complete
4f5e84bede19: Pull complete
6a839ba8a519: Pull complete
4d85c23523be: Pull complete
6ecdfc845b08: Pull complete
b95b4f48a896: Pull complete
9a3069facbd1: Pull complete
df70056c400d: Pull complete
Digest: sha256:6e64f63a663a368cc81b28ed3c3e29e6b3784c04f0128be5aaa659157ed4d231
Status: Downloaded newer image for node:latest
docker run --rm -it node /bin/sh -c "exit"
0.86s user
0.46s system
0% cpu
7:16.31 total

7:16.31 - this might as well be eternity.

I've looked around and figured out that most likely this is due to how Docker's storage driver works. I know that there are issues with AUFS support for Raspberry Pi - but what about Overlay2?

Let's check out if we can get that installed too and speed things up.

Let's run docker info to see what we're using.

docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 18.09.7
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.19.57-v7+
Operating System: Raspbian GNU/Linux 10 (buster)
OSType: linux
Architecture: armv7l
CPUs: 4
Total Memory: 926.1MiB
Name: ubertester
ID: H3KH:RMIG:ENE6:TE5Q:W4Q7:FS7P:BHH2:K2UN:GUQ6:R4SV:3H7Y:ZI2R
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

Oh...

Well, I guess we're already using overlay2. Maybe it's just that the read/write speeds on my Micro Center Micro SDHC suck.

Let's see if we can bench mark that.


Micro SDHC Read/Write Speeds

Thank you Jeff Geerling for already thinking about this for me.

Jeff gave us this:

curl https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh | sudo bash
curl https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2227  100  2227    0     0  12725      0 --:--:-- --:--:-- --:--:-- 12798

Raspberry Pi Dramble microSD benchmarks
microSD clock: 50.000 MHz

Installing hdparm...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  powermgmt-base
Suggested packages:
  apmd
The following NEW packages will be installed:
  hdparm powermgmt-base
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 kB of archives.
After this operation, 259 kB of additional disk space will be used.
Get:1 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf hdparm armhf 9.58+ds-1 [108 kB]
Get:2 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf powermgmt-base all 1.34 [11.1 kB]
Fetched 119 kB in 3s (41.3 kB/s)
Selecting previously unselected package hdparm.
(Reading database ... 40745 files and directories currently installed.)
Preparing to unpack .../hdparm_9.58+ds-1_armhf.deb ...
Unpacking hdparm (9.58+ds-1) ...
Selecting previously unselected package powermgmt-base.
Preparing to unpack .../powermgmt-base_1.34_all.deb ...
Unpacking powermgmt-base (1.34) ...
Setting up powermgmt-base (1.34) ...
Setting up hdparm (9.58+ds-1) ...
Processing triggers for man-db (2.8.5-2) ...
Install complete!

Installing iozone...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1800k  100 1800k    0     0  2346k      0 --:--:-- --:--:-- --:--:-- 2343k

Building iozone for Linux-arm


Building fileop for Linux-arm


Building the pit_server

Install complete!

Running hdparm test...

/dev/mmcblk0:
 HDIO_DRIVE_CMD(identify) failed: Invalid argument
 Timing buffered disk reads:  66 MB in  3.04 seconds =  21.68 MB/sec

Running dd test...

51200+0 records in
51200+0 records out
419430400 bytes (419 MB, 400 MiB) copied, 37.3457 s, 11.2 MB/s

Running iozone test...
	Iozone: Performance Test of File I/O
	        Version $Revision: 3.434 $
		Compiled for 32 bit mode.
		Build: linux-arm

	Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
	             Al Slater, Scott Rhine, Mike Wisner, Ken Goss
	             Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
	             Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
	             Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
	             Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
	             Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
	             Vangel Bojaxhi, Ben England, Vikentsi Lapa,
	             Alexey Skidanov.

	Run began: Sun Jul 14 18:25:54 2019

	Include fsync in write timing
	O_DIRECT feature enabled
	Auto Mode
	File size set to 102400 kB
	Record Size 4 kB
	Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2
	Output is in kBytes/sec
	Time Resolution = 0.000001 seconds.
	Processor cache size set to 1024 kBytes.
	Processor cache line size set to 32 bytes.
	File stride size set to 17 * record size.
                                                              random    random     bkwd    record    stride
              kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
          102400       4      259      253     5661     5651     5016      252

iozone test complete.

microSD card benchmark complete!

So...

I don't totally understand how to read these iozone results yet. I'll figure that out and come back and edit this post.

However, I do understand the hdparm and dd tests:

Micro Center Micro SDHC Card:

test result
hdparm: 21.68 MB/sec
dd: 11.2 MB/sec

Which basically means my Micro Center Micro SDHC Card is more than half as crappy as the SanDisk Extreme 32GB which got great results on Jeff Geerling's blog post.

SanDisk Extreme 32GB:

test result
hdparm: 43.95 MB/sec
dd: 39.5 MB/sec

Conclusion

It's possible, and not that painful

Installing Docker on your Raspberry Pi isn't terrible right now - it's totally possible with a few workarounds - and this should smooth out in the near future as the Docker Community is actively working on solutions to the current pain points.

Crappy SDHC Card = Crappy Docker

Simply put, you can get a couple inexpensive, but good quality Micro SDHC Cards which make life better. If you have a Raspberry Pi 4, you can use USB 3.0 and a nice SSD card and it will probably work like it does on your dev box.


Updates to this post will happen over time to keep this fresh and current since this is under active development by the Docker Community. Not to mention I have a few thoughts above left to clean up.

Update: 1:23:03 Runtime on Raspberry Pi 4 4GB with the Sandisk Extreme 128GB Micro SDHC - LOVE IT!

time docker run --rm -it node /bin/sh -c "exit"
Unable to find image 'node:latest' locally
latest: Pulling from library/node
162e276b1a29: Pull complete 
052e82067950: Pull complete 
4f5e84bede19: Pull complete 
6a839ba8a519: Pull complete 
4d85c23523be: Pull complete 
6ecdfc845b08: Pull complete 
b95b4f48a896: Pull complete 
9a3069facbd1: Pull complete 
df70056c400d: Pull complete 
Digest: sha256:6e64f63a663a368cc81b28ed3c3e29e6b3784c04f0128be5aaa659157ed4d231
Status: Downloaded newer image for node:latest
docker run --rm -it node /bin/sh -c "exit"  0.30s user 0.33s system 0% cpu 1:23.03 total