base0
Posts: 6
Joined: Thu Jul 18, 2019 1:52 am

cannot install docker on Raspbian 10 on Raspberry Pi 3 B+

Thu Jul 18, 2019 1:58 am

I cannot install docker on Raspbian 10 running on Raspberry Pi 3 B+.

I use the following command.

Code: Select all

sudo curl -sSL https://get.docker.com | sh
And its output.

Code: Select all

# Executing docker install script, commit: 6bf300318ebaab958c4adc341a8c7bb9f3a54a1a
+ 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 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
E: Package 'docker-ce' has no installation candidate

Siever
Posts: 2
Joined: Thu Jul 18, 2019 12:26 pm

Re: cannot install docker on Raspbian 10 on Raspberry Pi 3 B+

Thu Jul 18, 2019 12:42 pm

Docker is not officially supported on Buster yet so you need to do a little hack in the installation script.

First download script:

Code: Select all

curl -fsSL get.docker.com -o get-docker.sh

Open it in text editor and find this section:

Code: Select all

 debian|raspbian)
                        dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
                        case "$dist_version" in
                                9)
                                        dist_version="stretch"

You need to change 9 to 10 so it looks like this:

Code: Select all

debian|raspbian)
                        dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
                        case "$dist_version" in
                                10)
                                        dist_version="stretch"
Save and run installation script and it should install normally. Hope it helps:)

base0
Posts: 6
Joined: Thu Jul 18, 2019 1:52 am

Re: cannot install docker on Raspbian 10 on Raspberry Pi 3 B+

Fri Jul 19, 2019 4:30 am

It works! Thank you very much.

Return to “General discussion”