2

I'm using a Raspberry Pi 1 Model B.

I've just installed using the easy script:

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

install results:

# Executing docker install script, commit: 4957679
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sudo -E sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian stretch edge" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
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 jimjamz

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 https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

added my user to the docker group:

sudo usermod -aG docker jimjamz

logged out, logged back in and I wanted to confidence check docker:

docker -v

result:

Docker version 18.09.0, build 4d60db4

but when I want to use any other docker command:

docker ps -a

result:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

checking the status of the docker service:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: core-dump) since Sat 2019-01-26 14:45:07 UTC; 14min ago
     Docs: https://docs.docker.com
  Process: 4314 ExecStart=/usr/bin/dockerd -H unix:// (code=dumped, signal=SEGV)
 Main PID: 4314 (code=dumped, signal=SEGV)
      CPU: 668ms

checking the journal for further info:

sudo journalctl -qxe | grep docker

result:

Jan 26 14:44:33 JIMJAMZ-PI sudo[4215]:  jimjamz : TTY=pts/0 ; PWD=/home/jimjamz ; USER=root ; COMMAND=/usr/bin/docker ps -a
Jan 26 14:44:49 JIMJAMZ-PI sudo[4248]:     root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/service docker restart
-- Subject: Unit docker.service has begun start-up
-- Unit docker.service has begun starting up.
Jan 26 14:44:53 JIMJAMZ-PI systemd[1]: docker.service: Main process exited, code=dumped, status=11/SEGV
-- Subject: Unit docker.service has finished shutting down
-- Unit docker.service has finished shutting down.
Jan 26 14:44:53 JIMJAMZ-PI systemd[1]: docker.service: Unit entered failed state.
Jan 26 14:44:53 JIMJAMZ-PI systemd[1]: docker.service: Failed with result 'core-dump'.
Jan 26 14:44:59 JIMJAMZ-PI sudo[4268]:     root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/service docker start
-- Subject: Unit docker.service has begun start-up
-- Unit docker.service has begun starting up.
Jan 26 14:45:06 JIMJAMZ-PI systemd[1]: docker.service: Main process exited, code=dumped, status=11/SEGV
-- Subject: Unit docker.service has failed
-- Unit docker.service has failed.
Jan 26 14:45:06 JIMJAMZ-PI systemd[1]: docker.service: Unit entered failed state.
Jan 26 14:45:06 JIMJAMZ-PI systemd[1]: docker.service: Failed with result 'core-dump'.
-- Subject: Unit docker.service has finished shutting down
-- Unit docker.service has finished shutting down.

Set docker to auto-start:

sudo systemctl enable docker

When trying to start the service manually:

systemctl start docker.service

result:

Failed to start docker.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files

Same problem still occurs after reboot. The problem also occurs for root user.

Does this have something to do with the installation using [arch=armhf] instead of [arch=arm32v6]?

  • Does this have something to do with no .. .raspberry pi is armhf - I just installed docker on my pi3B - no issues at all ... trying on pi1B because I'm assuming that's what you actually have, since you mentioned only B .. no 1 2 or 3 – Jaromanda X Jan 27 at 1:31
  • yeah, looks like it fails on pi1 - perhaps you need a 2 or 3 for docker – Jaromanda X Jan 27 at 1:35
  • Hi. Thanks for your comment. Sorry, I may not have fully understood all of your comment, but from what I can gather, it's not related to the architecture option specified (so armhf is correct?). Also, I should have made it more clear that I am using a Raspberry Pi 1 Model B. Sorry, I didn't realise there was a Model B for the later Pis. So, you're saying this works on a Pi 3, but not on the Pi 1? Interesting. Strangely, I haven't come across any online search results similar to this, which could imply that no-one is using a Docker on a Pi 1? That seems unlikely. – jimjamz Jan 27 at 19:53
  • @Jaromanda X - Did you receive the same error on your Pi 1 Model B, as I did? Or did you receive a different error? – jimjamz Jan 27 at 19:58
  • Same error i.e. seg fault core dumped – Jaromanda X Jan 28 at 0:25
1

Please note a previous version of this answer recommended installing version 18.06.1 of docker-ce however this version does not include the patch for the runc CVE that allowed for container escape as pointed out in the thread. Versions 18.06.2 and 18.06.3 both reportedly work and are not vulnerable to CVE-2019-5736. Commands below have been updated accordingly.

Newer docker versions don't seem to work on Raspbery 1 and Raspberry 0. I had the same issue. Found this bug ticket which explained to install docker v18.06.2 to get to a working version.

sudo apt-get purge docker-ce
sudo apt-get install docker-ce=18.06.2~ce~3-0~raspbian
sudo systemctl enable docker && sudo systemctl start docker

Worked for me on a Raspberry 0...

  • 1
    I couldn't get 18.06.3 to work. Didn't test 18.06.2. But @DaveLak pointed out the vulnarability of 18.06.1 and that's a very important point. So I accepted the edit. – nnn Apr 17 at 8:44
  • FWIW I did get 18.06.2 working on a Raspberry Pi 0 W and was able to, in part due to your answer here. Thanks @nnn – DaveLak Apr 18 at 2:43
  • Ok, then we know that 18.06.2 works! I have to give it a try again. Did you try 18.06.3? – nnn Apr 18 at 6:02
  • No, I did not. Only 18.06.2 – DaveLak May 3 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.