Trying to install Docker on one of my PIs and I'm getting a recurring error:
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $ curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4
+ 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
+ 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: Sub-process /usr/bin/dpkg returned an error code (1)
I've followed suggestions to ensure I've cleared all traces of Docker off my system and tried to reinstall but the install always ends w/the error above.
Then I get a permission error trying to run docker info, run hello-world, etc:
pi@raspberrypi:~ $ docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
Server:
ERROR: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info: dial unix /var/run/docker.sock: connect: permission denied
errors pretty printing info
I have ensure thed default user (pi) is in the docker group:
sudo usermod -aG docker pi
Checked docker status and see errors - not sure how to resolve, however:
pi@raspberrypi:~ $ sudo service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-03-01 16:06:47 PST; 2min 27s ago
Docs: https://docs.docker.com
Process: 15160 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.so
Main PID: 15160 (code=exited, status=1/FAILURE)
Mar 01 16:06:47 raspberrypi systemd[1]: docker.service: Service RestartSec=2s expired, scheduli
Mar 01 16:06:47 raspberrypi systemd[1]: docker.service: Scheduled restart job, restart counter
Mar 01 16:06:47 raspberrypi systemd[1]: Stopped Docker Application Container Engine.
Mar 01 16:06:47 raspberrypi systemd[1]: docker.service: Start request repeated too quickly.
Mar 01 16:06:47 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 01 16:06:47 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
lines 1-13/13 (END)
Any suggestions? I'm stuck...