1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00

Add on-failure to default restart policy

In the event that the docker daemon is managed by systemd and spontaneously
dies the default service configuration does not have docker restart. For people
who just want to install and start docker then never worry about whether docker
is running a better default may be to restart the service on a failure.

Signed-off-by: Ryan Abrams <rdabrams@gmail.com>
Upstream-commit: 7b9ecb9700ebd90c7f5854028f0f981f0fe5d03a
Component: engine
This commit is contained in:
Ryan Abrams
2017-01-04 15:31:04 -08:00
parent a89bf941cb
commit 857c35324a
2 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,10 @@ TimeoutStartSec=0
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

View File

@@ -23,6 +23,10 @@ TimeoutStartSec=0
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target