Workaround:
As systemd fails to start docker.socket, let’s try to replace it.
The command dockerd --host=fd:// fails to start. Replacing “fd” with “unix” works though, “fd” is for systemd (doc). So this is the idea:
- Disable the systemd socket:
# systemctl mask docker.socket - Copy the service unit file /usr/lib/systemd/system to /etc/systemd/system/ to temporarily modify the service without changing the original file.
cp -vi /usr/lib/systemd/system/docker.service /etc/systemd/system/docker.service - In the new service unit file, replace “fd” with “unix”.
sed -i 's!host=fd://!host=unix://!' /etc/systemd/system/docker.service - Also disable the dependency on docker.socket.
sed -i 's!^Requires=docker.socket!#Requires=docker.socket!' docker.service
Now, Docker starts:
# systemctl daemon-reload
# systemctl restart docker.service
# systemctl status docker.service
...
systemd[1]: docker.service: Changed start -> running
A real fix would be appreciated though. Is this error documented somewhere?