Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-CE need updating for raspbian buster #709

Closed
1 of 2 tasks
nlt6444 opened this issue Jun 26, 2019 · 138 comments
Closed
1 of 2 tasks

Docker-CE need updating for raspbian buster #709

nlt6444 opened this issue Jun 26, 2019 · 138 comments

Comments

@nlt6444
Copy link

nlt6444 commented Jun 26, 2019

  • This is a bug report
  • This is a feature request
  • [ x] I searched existing issues before opening this one

Expected behavior

Successful install

Actual behavior

Docker-CE is unavailable for raspbian buster. I would to request an update to the application.

Steps to reproduce the behavior

Install the following prerequisites.

sudo apt-get install apt-transport-https ca-certificates software-properties-common -y
b. Download and install Docker.

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
c. Give the ‘pi’ user the ability to run Docker.

sudo usermod -aG docker pi
d. Import Docker CPG key.

sudo curl https://download.docker.com/linux/raspbian/gpg
e. Setup the Docker Repo.

vim /etc/apt/sources.list
Add the following line and save:

deb https://download.docker.com/linux/raspbian/ stretch stable

@Floppy
Copy link

Floppy commented Jun 27, 2019

This is definitely a problem, because as noted in #545, the docker.io package in the default raspbian buster repo isn't working at all either.

@EasternPA
Copy link

EasternPA commented Jun 28, 2019

Edit: Removing prior comment. I was an idiot. I mistakenly specified [arch=amd64] in /etc/apt/sources.list. I changed arch to armhf and docker-ce showed right up and installed properly.

@garyng
Copy link

garyng commented Jun 29, 2019

Any updates on this?

@Qarasique
Copy link

Confirm, cant install on raspbian buster

@hminaya
Copy link

hminaya commented Jun 29, 2019

Any way to manually install?

@marklagendijk
Copy link

marklagendijk commented Jun 29, 2019

The docker packages are included in Raspbian buster by default.
You can install with sudo apt-get install docker.io docker-compose.
Restart after installation.

Update:
Although you can install docker and docker-compose, you get the error ERROR: for SERVICE_NAME Cannot start service SERVICE_NAME: unable to find "net_prio" in controller set: unknown when trying to start any image.
As described here this is because of an outdated version of containerd in the docker-io package.

@kolektiv
Copy link

kolektiv commented Jun 29, 2019 via email

@garyng
Copy link

garyng commented Jun 29, 2019

Any way to manually install?

I manually edited the install script from get.docker.com to force it to download the stretch version of docker. Maybe give it a try?

@hminaya
Copy link

hminaya commented Jun 29, 2019

@garyng how did it work out for you? All good with the containers?

@garyng
Copy link

garyng commented Jun 29, 2019

@hminaya seems pretty stable ... for now

@MBlokhuijzen
Copy link

@garyng could you maybe share the the script? I'm not entirely sure what to edit in the script

@MBlokhuijzen
Copy link

Found a way to do it.

  • Edit /etc/apt/sources.list.d/docker.list
  • Change line to: deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable

After that I'm able to use Docker

@andresbono
Copy link

I confirm it works for now. Oneliner to install it on raspbian buster:

curl -sL get.docker.com | sed 's/9)/10)/' | sh

@kasprzakdanielt
Copy link

I confirm it works for now. Oneliner to install it on raspbian buster:

curl -sL get.docker.com | sed 's/9)/10)/' | sh

still just a workaround, not a fix tho

@notogawa
Copy link

@MBlokhuijzen, it works on pi3. On pi0, it fails with illegal instruction.

@notogawa
Copy link

I think there is no docker-ce package and workaround works on pi0(armv6) raspbian buster.

@notogawa
Copy link

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

@xenosathl
Copy link

For more detailed explanation of workaround proposed by @andresbono

  1. Find do_install function. (in my scenario line 205.)
  2. Find switch for $lsb_dist (in my scenario 280.) and proceed to 'debian|raspbian' case.
  3. Inside sub-switch $dist_version (in my scenario 293.) add another case like:
case "$dist_version" in
    10)
        dist_version="stretch"
         ;;
# [...]

@lowdef
Copy link

lowdef commented Jun 30, 2019

I confirm it works for now. Oneliner to install it on raspbian buster:

curl -sL get.docker.com | sed 's/9)/10)/' | sh

does not work here on RPi 3 B+. Pristine install from recent NOOBS, installs buster:

pi@raspberrypi:~/src/docker $ curl -sL get.docker.com | sed 's/9)/10)/' | sh
# Executing docker install script, commit: 2f4ae48
+ sudo -E sh -c apt-get update -qq >/dev/null
E: The repository 'https://download.docker.com/linux/raspbian 10 Release' does not have a Release file.

post edit:
It works if you make sure the repository config is clean, see the answer from @caio below.

@theDiverDK
Copy link

The oneline does not work on Raspberry PI 3b either.

Get the same error as @lowdef :-(

@caio
Copy link

caio commented Jun 30, 2019

@lowdef & @theDiverDK - The error you are getting is because the script is resuming from a partial state. If you drop the repository config, the curl|sed|sh workaround you're trying should work:

sudo rm /etc/apt/sources.list.d/docker.list;
curl -sL get.docker.com | sed 's/9)/10)/' | sh

(Or just adjust the file to point to stretch instead of 10, as mentioned @ #709 (comment))

@theDiverDK
Copy link

theDiverDK commented Jun 30, 2019

thanks @caio

It sure does work now, thanks :)

@brtwrst
Copy link

brtwrst commented Jun 30, 2019

I got it installed without problems by downloading the most recent .deb files for containerd.io, docker-ce-cli and docker-ce from here https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/
and installing them in that order with sudo dpkg -i <deb-file>

System:
Raspberry PI 4
Latest Raspbian Buster
deb files: containerd.io_1.2.6-3_armhf.deb docker-ce_18.09.7~3-0~debian-buster_armhf.deb docker-ce-cli_18.09.7~3-0~debian-buster_armhf.deb

@d11wtq
Copy link

d11wtq commented Jul 1, 2019

Following the manual instructions and using the latest edge instead of stable works for me on buster https://docs.docker.com/install/linux/docker-ce/binaries/#install-daemon-and-client-binaries-on-linux

@sirius1024
Copy link

It worked with @caio 's way.

@notogawa
Copy link

notogawa commented Jul 3, 2019

please report which device you use.

@sirius1024
Copy link

RPi 3 Model B (not plus).

@theDiverDK
Copy link

@caio 's way worked for me as well on a Raspberry Pi 3b (not plus)

Now i am just waiting for my Pi4 4gb :)

@markmcgookin
Copy link

markmcgookin commented Aug 20, 2019 via email

@clauderobi
Copy link

Ok, will try it. (But is it difficult to work against docker layer reuse / caching to force a lot of layers to be updated....). So far so good but will keep an eye.

Having said that, though, the logic handling the waiting and timeout seems broken; it is not like there is no layers being actively pushed when the error occurs. In other word, there is net activity on some layers when the issue manifest itself. Also, this means that any automated push (build) or swarm (pulls are also affected) can not use parallel push/pull; unless you are certain that the network is never going to be congested (which can not be guaranteed for remote locations).

@microestc
Copy link

I also expect it to work in Raspbian GNU/Linux 10 (buster)

@cluttered-code
Copy link

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

worked on raspbian buster on pi 3B (not +) without any issues for me

@jrchen982
Copy link

jrchen982 commented Sep 21, 2019

@cluttered-code
curl -sSL https://get.docker.com | sh
This also worked on my 4B. Thank you.😄

@KEINOS
Copy link

KEINOS commented Sep 29, 2019

As of 2019/09/29, on my RaspberryPi Zero W on Buster, @MichaIng's solution on the comment above worked the best.

I could install Docker, just with the below 4 lines in a brand new installed Buster. Thanks!

$ cd /tmp
$ wget https://packagecloud.io/Hypriot/rpi/packages/raspbian/buster/containerd.io_1.2.6-1_armhf.deb/download.deb
$ sudo dpkg -i download.deb && sudo rm download.deb
$ sudo curl -sL get.docker.com | bash
Results of Hello-World

$ sudo docker run --rm hypriot/armhf-hello-world
Unable to find image 'hypriot/armhf-hello-world:latest' locally
latest: Pulling from hypriot/armhf-hello-world
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.io registry NOW to avoid future disruption.
4b84770bb49c: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:b618ec0cc3acf683e8d77ad6c5ec81546cddde2036eda9a78f628effdeca74cd
Status: Downloaded newer image for hypriot/armhf-hello-world:latest
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.
 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 Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/userguide/
$ sudo docker version
Client: Docker Engine - Community
 Version:           19.03.2
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        6a30dfc
 Built:             Thu Aug 29 06:18:36 2019
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.2
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       6a30dfc
  Built:            Thu Aug 29 06:12:41 2019
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc7+dev
  GitCommit:        029124da7af7360afa781a0234d1b083550f797c
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Update 2019/10/27:

Now you don't need the above for Raspbian Buster on Raspberry Pi Zero W (ARMv6l architectures) to install Docker!! 🎉

Just do: curl https://get.docker.com | sh

  • RasPi: Zero W ARMv6l/BCM2835/Rev.9000c1
  • Raspbian: 2019-09-26-raspbian-buster-lite.zip
  • Docker install script: commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
  • Test: sudo docker run --rm hypriot/armhf-hello-world

@foxfluff
Copy link

foxfluff commented Oct 6, 2019

With the new release of raspbian buster it seems like this is no longer an issue. Working just fine on my rpi 4B using the provided helper script.

@StefanScherer
Copy link
Member

@KEINOS no need to download the hypriot packagecloud version any longer. The new containerd package 1.2.10 from download.docker.com repo just works on Raspberry Pi Zero.

I've tested curl https://get.docker.com | sh on the current Raspbian LITE on a Pi Zero and everything works.

@KEINOS
Copy link

KEINOS commented Oct 13, 2019

The new containerd package 1.2.10 from download.docker.com repo just works on Raspberry Pi Zero.

@StefanScherer Thank you for the info! I agree the official repo the better. But I searched the repo under https://download.docker.com/linux/raspbian/dists/buster/ and I couldn't find v1.2.10 but v1.2.6-3 under pool/ ... Where can I find containerd v1.2.10?

@MichaIng
Copy link

That's true, debug symbols package is v1.2.10 but container.io itself is still v1.2.6 on all branches. Not sure if this was reverted due to some issues or something? Release file has been updated on October 11., hence after @StefanScherer post.

@Thijxx
Copy link

Thijxx commented Oct 14, 2019

@KEINOS no need to download the hypriot packagecloud version any longer. The new containerd package 1.2.10 from download.docker.com repo just works on Raspberry Pi Zero.

I've tested curl https://get.docker.com | sh on the current Raspbian LITE on a Pi Zero and everything works.

That is odd, I have a new Pi, new SD card, new downloaded Raspbian Lite, new installation, everything fresh and it still does not work, the command on three different Pi's tested 3 times per Pi always and only fails as it did before.

edit
The solution above by @KEINOS works for me. Tested on Pi Zero W with clean install.

@PatrickLang
Copy link

If it matters, I didn't need to do any extra workarounds on Raspbian "Buster" on a RPi 2. curl https://get.docker.com | sh worked as expected.

Packages installed:

ii  containerd.io                  1.2.10-3                            armhf        An open and reliable container runtime
ii  docker-ce                      5:19.03.4~3-0~raspbian-buster       armhf        Docker: the open-source application container engine
ii  docker-ce-cli                  5:19.03.4~3-0~raspbian-buster       armhf        Docker CLI: the open-source application container engine

@thaJeztah
Copy link
Member

Thanks for confirming; with the updated containerd packages live, I think this issue is resolved; I'll close this one

@KEINOS
Copy link

KEINOS commented Oct 27, 2019

I also confirm that it just worked as expected with NO extra workarounds 🎉 on:

  • Raspbian Buster Lite (2019-07-10 image, Vanilla)
  • RaspberryPi Zero W (ARMv6l/BCM2835/Rev.9000c1)
  • Install: curl https://get.docker.com | sh
    • Docker install script commit ID: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1

Thanks! ❤️

oxivanisher added a commit to openrace/OpenRace that referenced this issue Dec 17, 2019
@foxundermoon
Copy link

foxundermoon commented Jan 12, 2020

 curl -sL get.docker.com | sed 's/9)/10)/' | sh
# Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "en_US.UTF-8",
	LC_TERMINAL = "iTerm2",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
+ 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 buster stable" > /etc/apt/sources.list.d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "en_US.UTF-8",
	LC_TERMINAL = "iTerm2",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (1)

actually install success

@Gregoire-Fremaux
Copy link

@foxundermoon i have the same problem ...

@foxundermoon
Copy link

@Valtureyn you can test by run sudo docker run --rm -it hello-world.

@Gregoire-Fremaux
Copy link

@Valtureyn you can test by run sudo docker run --rm -it hello-world.

Yes i have fix the issue the problem come from the apt-get dist-upgrade with last build of rabian buster now it's working Thank You

@OutsourcedGuru
Copy link

What a nightmare for Raspberry Pi 4B with Raspbian Buster Lite.

  • The only way I could install docker-ce was brtwrst's advice above. (This, having put in over two hours of attempts otherwise.)
  • The only way I could install docker-compose was using sudo pip3 install docker-compose at the global level.
  • It was necessary to add the pi user to the docker group, exit and return to the remote shell.

Although you can download the source for docker-compose there are no instruction anywhere for building that, once downloaded. The repository points you to the docker documentation for installation instructions and it shouldn't. The repository should tell you how to build the source.

Many commands like this one fail in an ugly way:

sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
cat /usr/local/bin/docker-compose
Not Found
# ^ as in, the contents of the script are these letters since there is no such
# file as docker-compose-Linux-armv7l in the indicated release

Is it too much to ask that Docker test the installation advice? The click-a-tab style of instructions found in Step 4 here require the user to know which architecture they're looking for. It might be better to do something like this instead:

sudo add-apt-repository
"deb [arch=$(uname -m)] https://download.docker.com/$(uname -s | awk '{print tolower($0)}')/$(something clever to return debian, for example)
$(lsb_release -cs)
stable"

@ItalyPaleAle
Copy link

@OutsourcedGuru shameless self-promotion, but I wrote how I did it here (incl Docker-compose), and seems like this has helped lots of people: https://withblue.ink/2019/07/13/yes-you-can-run-docker-on-raspbian.html

@thaJeztah
Copy link
Member

What is the problem currently with the install script at get.docker.com? Does it not detect the correct distro or architecture?

I don't have access to a raspberry myself to test it, but if changes are needed, the repository with that script is here; https://github.com/docker/docker-install, contributions welcome 🙏

@SuperSandro2000
Copy link

SuperSandro2000 commented Mar 15, 2020

I couldn't find any errors with the install script on an Raspberry Pi 3b with buster.

@mayweed
Copy link

mayweed commented Apr 18, 2020

Lo
Contrary to @OutsourcedGuru i succeded in installing Docker via the oneliner given by @andresbono (thx!! way much more clearer that the docs indeed) . Here is the output:

root@raspberrypi:/home/pi# curl -sL get.docker.com | sed 's/9)/10)/' | sh
# Executing docker install script, commit: 442e66405c304fa92af8aadaa1d9b31bf4b0ad94
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ 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)
+ sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b
 Built:             Wed Mar 11 01:34:34 2020
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b
  Built:            Wed Mar 11 01:28:34 2020
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
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 your-user

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.
root@raspberrypi:/home/pi# usermod -aG docker pi

Am not sure the sed sub is needed right now though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests