Docker on Rock Pi 4 - Ubuntu or Debian


#1

Hi there

I’ ve got my Rock Pi 4 one week ago. It will serve as a smart home server and replace my Raspberry Pi3 that runs over its limits.

Fhem is running, java is running and the next step would be docker.

I’m trying to install it for 3 days now. Nothing works. I cant get the docker daemon running. Sometimes the errors are missing afs or overlay filesystem and/or other errors, that are unknown from my side.
I reinstalled linux (debian or ubuntu) several times.

I tried docker-ce, docker.io and some Installations from several gits. Also the script from itself for the Installation is not working.

Is anybody out there, that get docker running? With my lag of knowledge about linux, I have no chance to solve this problem.

Thanks for your help in advance.

Greetings, Marco


#2

Well, I had problem with bitness of docker. Even if the system is x64, docker was installed fine, but I didn’t managed to test it because apps inside wanted (don’t know why) 32 bits. I was trying to install Discourse, no success yet.


#3

Hello,
I do not Know Docker, but i installed it and was able to run the hello world. (https://docs.docker.com/get-started/)

I used this to install Dockers and Kubernetes (Kubernetes Cluster).

I installed it on Ubuntu.

Do you have a better test i can run to see if everything is OK?

I am in the process of learning clustering and how to use Docker.

Pierre

 >    
> rock@master:~$ sudo docker --version
> 
> Docker version 18.06.1-ce, build e68fc7a
> 
> docker info
> 
> Containers: 21
>  Running: 20
>  Paused: 0
>  Stopped: 1
> Images: 8
> Server Version: 18.06.1-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:  (expected: 468a545b9edcd5932818eb9de8e72413e616e86e)
> runc version: N/A (expected: 69663f0bd4b60df09991c08812a60108003fa340)
> init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
> Security Options:
>  seccomp
>   Profile: default
> Kernel Version: 4.4.154-59-rockchip-g5e70f14
> Operating System: Ubuntu 18.04.1 LTS
> OSType: linux
> Architecture: aarch64
> CPUs: 6
> Total Memory: 3.722GiB
> Name: master
> ID: L23N:J5AY:KTZ4:VVL5:3VJM:336A:7FW7:F7CN:3WFV:EPMM:VJRT:S3RP
> 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
> 
> rock@master:~$ docker run hello-world
> 
> 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.
>     (arm64v8)
>  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:
>  https://hub.docker.com/
> 
> For more examples and ideas, visit:
>  https://docs.docker.com/get-started/

#4

Which Ubuntu did you use? The download from Radxa? I cant get it running…

How did you activate the overlay or overlay2 filesystem? I think this could be the Error, but I dont know excactly.

root@linux:/etc/docker# sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
root@linux:/etc/docker# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled
   Active: failed (Result: exit-code) since Sun 2019-01-13 21:01:02 UTC; 1min 11s ago
 Docs: https://docs.docker.com
  Process: 3720 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 3720 (code=exited, status=1/FAILURE)

Jan 13 21:01:02 linux systemd[1]: docker.service: Service hold-off time over, scheduli
Jan 13 21:01:02 linux systemd[1]: docker.service: Scheduled restart job, restart count
Jan 13 21:01:02 linux systemd[1]: Stopped Docker Application Container Engine.
Jan 13 21:01:02 linux systemd[1]: docker.service: Start request repeated too quickly.
Jan 13 21:01:02 linux systemd[1]: docker.service: Failed with result 'exit-code'.
Jan 13 21:01:02 linux systemd[1]: Failed to start Docker Application Container Engine.
Jan 13 21:01:35 linux systemd[1]: docker.service: Start request repeated too quickly.
Jan 13 21:01:35 linux systemd[1]: docker.service: Failed with result 'exit-code'.
Jan 13 21:01:35 linux systemd[1]: Failed to start Docker Application Container Engine.

root@linux:/etc/docker# dockerd
    INFO[2019-01-13T21:07:02.798276718Z] libcontainerd: started new docker-containerd process  pid=3841
    INFO[2019-01-13T21:07:02.798587058Z] parsed scheme: "unix"                         module=grpc
    INFO[2019-01-13T21:07:02.798633725Z] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2019-01-13T21:07:02.798982274Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0  <nil>}]  module=grpc
    INFO[2019-01-13T21:07:02.799044400Z] ClientConn switching balancer to "pick_first"  module=grpc
    INFO[2019-01-13T21:07:02.799212695Z] pickfirstBalancer: HandleSubConnStateChange: 0x44201ab4d0, CONNECTING  module=grpc
    INFO[0000] starting containerd                           revision= version=docker-18.06.1-ce
    INFO[0000] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.aufs  error="modprobe aufs failed: "": exec: "modprobe": executable file not found in $PATH"
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.zfs  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
    INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
    WARN[0000] could not use snapshotter btrfs in metadata plugin  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
    WARN[0000] could not use snapshotter aufs in metadata plugin  error="modprobe aufs failed: "": exec: "modprobe": executable file not found in $PATH"
    WARN[0000] could not use snapshotter zfs in metadata plugin  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
    INFO[0000] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
    INFO[0000] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
    INFO[0000] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.leases-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
    INFO[0000] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
    INFO[0000] loading plugin "io.containerd.service.v1.tasks-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.containers"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.content"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.diff"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.events"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.healthcheck"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.images"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.leases"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.namespaces"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.snapshots"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.tasks"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.version"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.introspection"...  type=io.containerd.grpc.v1
    INFO[0000] serving...                                    address="/var/run/docker/containerd/docker-containerd-debug.sock"
    INFO[0000] serving...                                    address="/var/run/docker/containerd/docker-containerd.sock"
    INFO[0000] containerd successfully booted in 0.017916s
    INFO[2019-01-13T21:07:02.876336754Z] pickfirstBalancer: HandleSubConnStateChange: 0x44201ab4d0, READY  module=grpc
    INFO[2019-01-13T21:07:02.888232571Z] parsed scheme: "unix"                         module=grpc
    INFO[2019-01-13T21:07:02.888315115Z] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2019-01-13T21:07:02.888684372Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0  <nil>}]  module=grpc
    INFO[2019-01-13T21:07:02.888768957Z] ClientConn switching balancer to "pick_first"  module=grpc
    INFO[2019-01-13T21:07:02.888993836Z] pickfirstBalancer: HandleSubConnStateChange: 0x442051b230, CONNECTING  module=grpc
    INFO[2019-01-13T21:07:02.889759476Z] pickfirstBalancer: HandleSubConnStateChange: 0x442051b230, READY  module=grpc
    ERRO[2019-01-13T21:07:02.993500476Z] [graphdriver] prior storage driver devicemapper failed: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
    Error starting daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed

#5

Hi,

I used the Radxa (rockpi4b-ubuntu-bionic-minimal-20190104_2101-gpt).

   #!/bin/sh
sudo apt-get install -y curl
sudo apt-get install -y apt-transport-https
Install Docker

curl -sSL get.docker.com | sh &&
sudo usermod rock -aG docker

echo Adding " cgroup_enable=cpuset cgroup_enable=memory" to /boot/cmdline.txt
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
orig="$(head -n1 /boot/cmdline.txt) cgroup_enable=cpuset cgroup_enable=memory"
echo $orig | sudo tee /boot/cmdline.txt

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - &amp;&amp;
echo “deb http://apt.kubernetes.io/ kubernetes-xenial main” | sudo tee /etc/apt/sources.list.d/kubernetes.list &amp;&amp;
sudo apt-get update -q

sudo apt install [docker.io](http://docker.io)
sudo systemctl unmask docker.service
sudo systemctl start docker
sudo systemctl enable docker

--That is how i installed it.  Hope that helps

#6

With smoe extra goolge and your script, I get it working.

The trick was installing overlayfs.


#7

Just for Information…

If you start unminimize before installing Docker, it runs directly after

curl -sSL get.docker.com | sh &&

without any extra installations.


#8

How did you installed overlayfs? I can’t find such a packet… Is it overlay in lsmod | grep over?


#9

Restart your ubuntu and read the text in the shell. Un-minimize the ubuntu installation. Then you will get the ‘normal’ OverlayFS storagedriver.

Before I did the ‘sudo unminimize’ I searched hours and found a workarround. After I installed the SSD today, I did not find it again, bit I read the information on login screen (I had to reinstall everything again ;)).

Dont try to search… Again… Just unminimize.

Greatings, Marco


#10

Unminimize does not work at this moment. I just give ‘y’ and no error message, nothing happens.
I must’ve been unminimized the Ubuntu at the beginning.
Now system is completely configured and I don’t want to start from scratch.

Well, docker seems to be working fine and sees overlay2 but I can’t install discourse. The error message is:

[0][19:34][root@rock][/var/discourse] $ ./launcher rebuild app
standard_init_linux.go:190: exec user process caused "exec format error"
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam

From docker/discourse forums (given link also) you can read many different stories:

  1. no support for ARM nor aarch64
  2. docker in this case is fine

and some other. I’m stuck.


#11

I think I reinstalled the Linux about 20 times and every time I learned something new. Three times the system was finalized, one App doesn’t work only. So I searched for a fix and started fresh again.
I don’t want to have ‘workarround system’. It should be stable. That’s what I prefer.

Good luck!

Greatings, Marco

P. S.: I didn’t had this kind of error msg, so I don’t habe a clue


#12

Ok, got it! ARM64 is not yet supported: https://meta.discourse.org/t/arm64-and-docker-discourse/104050


#13

I was able to get Docker installed on the Radxa Debian image after updating the kernel following the guide here; and then enabling ip_tables (via sudo modprobe ip_tables). I also had to enable experimental features on Docker so I could use the --platform=arm64 tag to download images.

However, now I’m stuck again because Docker will not run any containers that are based on Ubuntu–they all fail with an “Exit Code 159” (container die <container_id> (exitCode=159, image=ubuntu:bionic...) and I cannot find that code documented anywhere. I also cannot build any Docker containers using ubuntu as a source–I get the same error code as soon as I do something like apt-get update in the Dockerfile.

I’m stumped on this one, going to switch to the Ubuntu image and see if I have better luck. If anyone has gotten this working yet, please share how… Being able to use Docker is a must-have for me to keep this board.


#14

I am having issues with https://errorcode0x.com/resolve-steam-error-code-80/ on the UBUNTU platform. Please suggest me a good browser or OS