Docker in Raspberry Pi

Hello,

I have a Raspberry Pi Model B Plus Rev 1.2, I try this to install DOcker:

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
usermod -aG docker pi

The try to execute docker, but have this error:

# docker run hello-world

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.`
See ‘docker run --help’.

I am missing something?

I will appreciate your help.

Kind regards.

Issue a systemctl start docker and retry the docker run command.

1 Like

Thanks,

systemctl start docker

Job for docker.service canceled.

docker run hello-world

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See ‘docker run --help’.

Regards.

Any error mesages when you issued the systemctl start docker command and got the Job for docker.service canceled. message?

You can also run the journalctl command to display the Docker service logs.

journalctl --no-pager -u docker.service

Look for any errors that may help to diagnose why the docker service will not start.

Hi,
I had the same problem with my raspberry 2B+.
I always get a seg. fault (for dockerd) with the newest docker version (used the installation script from docker.com on a fresh raspbian stretch installation).

I did a downgrade:

sudo apt-get install docker-ce=18.06.1~ce~3-0~raspbian

See https://github.com/moby/moby/issues/38175

At least the ‘dockerd’ started without errors except the following ‘warnings’ in the Docker service logs:

level=warning msg=“Your kernel does not support swap memory limit”
level=warning msg=“Your kernel does not support cgroup cfs period”
level=warning msg=“Your kernel does not support cgroup cfs quotas”
level=warning msg=“Your kernel does not support cgroup rt period”
level=warning msg=“Your kernel does not support cgroup rt runtime”
level=warning msg=“Unable to find cpuset cgroup in mounts”
level=warning msg=“mountpoint for pids not found”

But, running the ‘hello-world’ example produces no output :thinking:
Return value is ‘139’
Any ideas what’s going wrong here ?
Thanks in advance.

Hi. Saw this article -> https://blog.raveland.org/post/docker_raspian/
Take a look, it looks like it might help you.
I saw this in the article:

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


Thank you for the hint.
I modified my ‘/boot/cmdline.txt’ and some warnings disappeared from the end of the ‘docker info’ output.

But still the ‘hello-world’ example does not work (no output on console).

Saw this too which makes sense.

Make sure you use this image armv6l/hello-world.

docker run armv6l/hello-world

Hello Gary,
again thank you for that hint.
This pushed me in the right direction…

For my raspberrypi 2+: ‘ARMv6-compatible processor rev 7 (v6l)’
the following image works
‘arm32v5/hello-world’ :star_struck:

Maybe a hint under https://github.com/docker-library/official-images#architectures-other-than-amd64
for ‘ARMv5 32-bit (arm32v5)’ and Raspberry 2x would be helpful.

Again thank you very much for your support.

Awesome! Glad to hear it.

I just purchased a Raspberry PI 3 B+.
Hoping to get Docker up and running on it.

Done. Submitted a Pull request with that update for the ‘ARMv5 32-bit (arm32v5)’ and Raspberry 2x