1

I am trying to install docker on a rpi4 but I have this error when I run

sudo apt-get install docker-ce docker-ce-cli containerd.io -y

I have

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2021-02-15 19:44:36 GMT; 14ms ago
     Docs: https://docs.docker.com
  Process: 9174 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 9174 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce:armhf (--configure):
 installed docker-ce:armhf package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of docker-ce-rootless-extras:armhf:
 docker-ce-rootless-extras:armhf depends on docker-ce; however:
  Package docker-ce:armhf is not configured yet.

dpkg: error processing package docker-ce-rootless-extras:armhf (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (241-7~deb10u6) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
 docker-ce:armhf
 docker-ce-rootless-extras:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

My journalctl logs

$ journalctl -fu docker
-- Logs begin at Thu 2019-02-14 10:11:58 GMT. --
Feb 15 19:44:43 raspberrypi4 dockerd[9311]: failed to start daemon: error initializing graphdriver: driver not supported
Feb 15 19:44:43 raspberrypi4 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Feb 15 19:44:43 raspberrypi4 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 15 19:44:43 raspberrypi4 systemd[1]: Failed to start Docker Application Container Engine.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Scheduled restart job, restart counter is at 4.
Feb 15 19:44:45 raspberrypi4 systemd[1]: Stopped Docker Application Container Engine.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Start request repeated too quickly.
Feb 15 19:44:45 raspberrypi4 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 15 19:44:45 raspberrypi4 systemd[1]: Failed to start Docker Application Container Engine.

What's wrong ?

2
0

I encountered the same issue just after having installed the kernel headers. If you did the same, remember to restart your RasPi, then check the service status

sudo systemctl status docker.service

I also prefered to specify the host in /etc/docker/daemon.json, see here for more details.

So I had to remove the -H option in the systemd unit config (/lib/systemd/system/docker.service)

Not sure about what exactly did the trick, but everything was up and running after the reboot. Not sure it is a permanent fix, as this file can be modified by your next apt upgrade or apt install docker-ce.

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.