Docker on Raspbian

January 3, 2018
Raspbian Raspberry PI Docker

Running Docker on Raspbian

You have one or more spare Raspberry Pi and you want to try docker on it ? Let’s go !

$ docker version
Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:21:15 2017
 OS/Arch:	linux/arm

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:17:21 2017
  OS/Arch:	linux/arm
  Experimental:	false
$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.12.0-ce
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 logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.14.10-v7+
Operating System: Raspbian GNU/Linux 9 (stretch)
OSType: linux
Architecture: armv7l
CPUs: 4
Total Memory: 927.2MiB
Name: docker04
ID: NK44:JM7Z:FRK7:NBS3:EM2U:BZ4P:YVJG:DFG3:M3PJ:2QYK:TD2M:X3QV
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

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

We can get rid of some of these warnings.

Modify the /boot/cmdline.txt, add these two parameters : cgroup_enable=memory swapaccount=1 and reboot

$ cat /boot/cmdline.txt 
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=d5e34328-02 rootfstype=ext4 elevator=deadline fsck.repair=yes cgroup_enable=memory swapaccount=1 rootwait

Now, we have:

$ docker info
...
WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

cfs is not compiled for the Raspbian Kernel, so you will keep these warnings.

Enjoy your new Docker machine 😄

Use constraints with Swarm

September 4, 2018
Docker

Setup a Let's encrypt certificate with Traefik

May 23, 2018
Docker traefik

Traefik for the beginners

May 4, 2018
Docker traefik