System info: Red Hat Enterprise Linux Server release 7.2 (Maipo)
Kernel: 3.10.0-327.36.3.el7.x86_64
Docker: Docker version 1.12.3, build 6b644ec
I have problems restarting the docker service after adding the line
ExecStart=/usr/bin/docker daemon -H fd:// -D -H tcp://0.0.0.0:2375
This results in an error message:
Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
To be more exact -> sudo service docker status
Redirecting to /bin/systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2016-10-31 18:45:15 UTC; 2min 17s ago
Docs: https://docs.docker.com
Process: 19647 ExecStart=/usr/bin/docker daemon -H fd:// -D -H tcp://0.0.0.0:2375 (code=exited, status=1/FAILURE)
Main PID: 19647 (code=exited, status=1/FAILURE)
Oct 31 18:45:15 c1 systemd[1]: Starting Docker Application Container Engine…
Oct 31 18:45:15 c1 docker[19647]: time=“2016-10-31T18:45:15.881843893Z” level=fatal msg="no sockets found via sock…stemd"
Oct 31 18:45:15 c1 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Oct 31 18:45:15 c1 systemd[1]: Failed to start Docker Application Container Engine.
Oct 31 18:45:15 c1 systemd[1]: Unit docker.service entered failed state.
Oct 31 18:45:15 c1 systemd[1]: docker.service failed.
My /lib/systemd/system/docker.service
file looks like:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/docker daemon -H fd:// -D -H tcp://0.0.0.0:2375
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target