docker daemon -H fd:// error out in shell

Multi tool use
Multi tool use


docker daemon -H fd:// error out in shell



I start the docker daemon with -H fd:// in shell, and it error out. The OS is CentOS7.


-H fd://


# docker daemon -H fd://
FATA[0000] No sockets found



I can start with systemctl start docekr.


systemctl start docekr


# cat /etc/systemd/system/docker.service.d/docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd://
# ps -ef|grep docker
/usr/bin/docker daemon -H fd://



In the admin guide, it says



On Systemd based systems, you can communicate with the daemon via Systemd socket activation, use docker daemon -H fd://. Using fd:// will work perfectly for most setups but you can also specify individual sockets: docker daemon -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.



So I can't use -H fd:// in shell?


-H fd://




2 Answers
2



To start docker daemon, fd:// means it's being started by Systemd, and the listening socket is created by Systemd and passed to docker daemon. So if you try to using it from terminal, it will fail because you don't create socket and pass it to docker daemon. For docker cli, you can use it the same way with tcp protocol if you have tcp socket listening.


fd://


tcp



I've answered a similar question at https://stackoverflow.com/a/43408869/1000254, you can refer to it for more details.



Edit systemd configuration file for docker daemon and remove H fd:// and Update ExecStart variables as shown below:


# cd /etc/systemd/system/docker.service.d
[root@docker docker.service.d]# cat override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock



Reload daemon and start service


systemctl daemon-reload
systemctl start docker
systemctl status docker |grep running



Active: active (running) since Sat 2018-06-30 14:52:49 CDT; 1min 56s ago
Jun 30 14:52:48 docker dockerd[16917]: time="2018-06-30T14:52:48.685718828-05:00" level=info msg="Firewalld running: true"
[root@docker docker.service.d]#






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

8kVyZQszSPmvTEA MMidIUnv4deW45QM h7,Wl09v zZ3goFmuISF1xQ2 qbjskbeIWo,o73FdaSLnd
yjz6Mmt d5p1dUnf8chQI2mfJ5 sKJM Q 8RKuWU2z70ljjRdBC gfdgu9Rn7 32xPEB b8bS9XH9KqRX7M qCD QPx

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

List of Kim Possible characters