3

I am trying to install Docker on a Raspberry Pi 4, but I am getting an error. May you tell me, how to fix this? Thanks a lot!

pi@raspberrypi:~ $ curl -fsSL https://get.docker.com -o get-docker.sh
pi@raspberrypi:~ $ sudo sh get-docker.sh
# Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4
+ 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
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $

Raspbian Version:

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Nighthawx
  • 35
  • 1
  • 6
  • Which flavor of Raspbian are you running? Have you tried to do a simple `sudo apt-get update`? – Gino Mempin Mar 04 '21 at 12:00
  • 1
    You mean the OS version? Yeah, I did a full update before trying to install Docker – Nighthawx Mar 04 '21 at 12:21
  • Are there no other errors? Might help: https://raspberrypi.stackexchange.com/q/103709 – Gino Mempin Mar 04 '21 at 12:26
  • 2
    You may have more luck in figuring this out if you don't redirect the output of the apt install to `/dev/null` – SiHa Mar 04 '21 at 12:49
  • @SiHa I believe it's not the OP's script, but the Docker script itself at https://get.docker.com/ was written to hide all the installation output as much as possible, which yeah makes it unfortunately bad for debugging. – Gino Mempin Mar 04 '21 at 13:33
  • 1
    @GinoMempin fair enough, but the commands can also be run manually – SiHa Mar 04 '21 at 13:34
  • @GinoMempin I guess your hint ( raspberrypi.stackexchange.com/q/103709) fixed the problem. Thanks! – Nighthawx Mar 06 '21 at 14:18

1 Answers1

2

Try:

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

  • sudo usermod -aG docker pi

  • log out then back in

  • wait a few for the docker socket to be up.

  • check it with: docker ps

  • if nogo try rebooting then wait a few.

rundmsteve
  • 38
  • 5