root@kali:~# apt-get install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
docker-ce
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.6 MB of archives.
After this operation, 96.2 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 345318 files and directories currently installed.)
Preparing to unpack .../docker-ce_17.06.1~ce-0~debian_amd64.deb ...
Unpacking docker-ce (17.06.1~ce-0~debian) ...
Setting up docker-ce (17.06.1~ce-0~debian) ...
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; disabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2017-08-31 11:25:18 EDT; 4ms ago
Docs: https://docs.docker.com
Process: 20853 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 20853 (code=exited, status=1/FAILURE)
CPU: 80ms
Aug 31 11:25:18 kali systemd[1]: docker.service: Unit entered failed state.
Aug 31 11:25:18 kali systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (234-2.3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@kali:~#
while starting docker.service, I noticed following error in /var/log/syslog:
Aug 31 15:48:49 kali dockerd[2360]: Error starting daemon: Error initializing network controller: list bridge addresses failed: no available network
I encountered the same problem when installing docker-ce and this fixed it for me.
I created the file as described and ran
$ sudo systemctl restart systemd-networkd.service # (disconnected network)
$ sudo apt remove docker-ce # If you hadn't done so before
$ sudo apt install docker-ce # Should start docker.service
$ sudo systemctl status docker.service # Verify docker.service is running
At this point I’d lost internet connection, to try and restore it I rollbacked my actions:
I removed the file /etc/systemd/network/bridge.network again and restarted systemd-networkd.service, to no avail.
I then rebooted my computer, after which the internet connection was restored and the docker.service was running normally…
I probably just needed to reboot to restore network connection, but removing the bridge.network file hasn’t broken docker.service either.
After the reboot I could succesfully run
$ sudo docker pull hello-world
I do have a VPN running (PIA) so maybe this interfered with docker network configuration.
I have this problem on a digital ocean droplet. Docker worked fine for years and when apt-get upgrade tried to presumably upgrade it recently, it died. Can anybody help me out?
When I log in, I get this:
Thank you for using DigitalOcean’s Docker Application.
Docker has been preinstalled and configured per Docker’s Recommendations.
“ufw” has not been enabled, however it has been configured. To enable it,
run “ufw enable”.
root@Gorman:~# docker version
Client: Docker Engine - Community
Version: 23.0.1
API version: 1.42
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:46:49 2023
OS/Arch: linux/amd64
Context: default
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
root@Gorman:~# apt remove docker
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'docker' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up docker-ce (5:23.0.1-1~ubuntu.18.04~bionic) ...
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 "restart" 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 2023-02-13 15:54:34 UTC; 10ms ago
Docs: https://docs.docker.com
Process: 3018 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 3018 (code=exited, status=1/FAILURE)
Feb 13 15:54:34 Gorman systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Feb 13 15:54:34 Gorman systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 13 15:54:34 Gorman systemd[1]: Failed to start Docker Application Container Engine.
dpkg: error processing package docker-ce (--configure):
installed docker-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@Gorman:~#