![]() | 1 | initial version |
Found out what I'm doing wrong. I created a conf file under /etc/systemd/system/docker.service.d
to override directives and preserving the docker.service
# cd /etc/systemd/system/
# mkdir docker.service.d
# cd docker.service.d
# vi override.conf
Then add the following directives (the ExecStart twice to reset the first in /usr/lib/systemd/system/docker.service
):
[Service]
EnvironmentFile=-/etc/sysconfig/docker
ExecStart=
ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS
Then daemon-reload and start docker
# systemctl daemon-reload
# systemctl start docker
![]() | 2 | No.2 Revision |
Found out what I'm doing wrong. I created a conf file under /etc/systemd/system/docker.service.d
to override directives and preserving the docker.service
# cd /etc/systemd/system/
# mkdir docker.service.d
# cd docker.service.d
# vi override.conf
Then add the following directives (the ExecStart twice to reset the first in /usr/lib/systemd/system/docker.service
):
[Service]
EnvironmentFile=-/etc/sysconfig/docker
ExecStart=
ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS
Then daemon-reload and start docker
# systemctl daemon-reload
# systemctl start docker
https://docs.docker.com/articles/systemd/