diff --git a/files/docker/docker.service.conf b/files/docker/docker.service.conf index 73d953ecfdd..ea7f29f5180 100644 --- a/files/docker/docker.service.conf +++ b/files/docker/docker.service.conf @@ -1,4 +1,14 @@ +# Docker daemon systemd service override configuration +# +# IMPORTANT: The -H fd:// flag is required for systemd socket activation. +# This allows Docker clients to connect to /var/run/docker.sock before +# docker.service starts - systemd listens on the socket and passes it to +# dockerd when the service starts. If changed to -H unix://, dockerd creates +# a new socket instead of inheriting the one systemd was listening on, causing +# early Docker commands to hang indefinitely. +# See: https://github.com/sonic-net/sonic-buildimage/issues/25383 + [Service] Environment=GODEBUG=netdns=cgo ExecStart= -ExecStart=/usr/bin/dockerd -H unix:// --storage-driver=overlay2 --bip=240.127.1.1/24 --iptables=false --ipv6=true --fixed-cidr-v6=fd00::/80 +ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay2 --bip=240.127.1.1/24 --iptables=false --ipv6=true --fixed-cidr-v6=fd00::/80