mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f74b856e1a
This adds support for reloading the docker daemon (SIGHIUP) so that changes in '/etc/docker/daemon.json' can be loaded at runtime by reloading the service through systemd ('systemctl reload docker') Before this change, systemd would output an error that "reloading" is not supported for the docker service; systemctl reload docker Failed to reload docker.service: Job type reload is not applicable for unit docker.service. After this change, the docker daemon can be reloaded through 'systemctl reload docker', which reloads the configuration; journalctl -f -u docker.service May 02 03:49:20 testing systemd[1]: Reloading Docker Application Container Engine. May 02 03:49:20 testing docker[28496]: time="2016-05-02T03:49:20.143964103-04:00" level=info msg="Got signal to reload configuration, reloading from: /etc/docker/daemon.json" May 02 03:49:20 testing systemd[1]: Reloaded Docker Application Container Engine. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
26 lines
801 B
Desktop File
26 lines
801 B
Desktop File
[Unit]
|
|
Description=Docker Application Container Engine
|
|
Documentation=https://docs.docker.com
|
|
After=network.target docker.socket
|
|
Requires=docker.socket
|
|
|
|
[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://
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
|
MountFlags=slave
|
|
LimitNOFILE=1048576
|
|
LimitNPROC=1048576
|
|
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
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|