Docker Community Forums

Share and learn in the Docker community.

What does this "-H fd:/" option mean in this docker.json file?

On Ubuntu 18.04.2

I wanted to set my Docker root dir so I followed the instructions given in

From the page, the /etc/systemd/system/docker.service.d/docker.root.conf contains

ExecStart=/usr/bin/dockerd -g /new/docker/root -H fd://

What does fd:// represent?

I’m trying to debug this error.

Creating Dockerfile from file /data/workspace/jenkins-project/deploy/docker/webapp/Dockerfile.
Determining image tag: my-image:2019-06-14-1
Using the native docker binary.
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
:Project:buildDocker FAILED
:Project:buildDocker (Thread[Daemon worker,5,main]) completed. Took 59.389 secs.
----- End of the daemon log -----


I’m guessing it means “file descriptor.”

Yep it does:

On Systemd based systems, you can communicate with the daemon via Systemd socket activation, use dockerd -H fd:// . Using fd:// will work perfectly for most setups but you can also specify individual sockets: dockerd -H fd://3 . If the specified socket activated files aren’t found, then Docker will exit. You can find examples of using Systemd socket activation with Docker and Systemd in the Docker source tree.


meyay’s answer is right. If you like to understand the detail of this, I recommend to read the following Stackoverflow answer and the blog article:

sockets - what does fd:// mean exactly in dockerd -H fd:// - Stack Overflow

That explains how docker daemon and systemd handle this parameter in detail.

When you start the Docker daemon, -H fd:// will tell Docker that the service is being started by Systemd and will use socket activation. systemd will then create the target socket and pass it to the Docker daemon to use.