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>
| ... | ... |
@@ -24,6 +24,10 @@ TimeoutStartSec=0 |
| 24 | 24 |
Delegate=yes |
| 25 | 25 |
# kill only the docker process, not all processes in the cgroup |
| 26 | 26 |
KillMode=process |
| 27 |
+# restart the docker process if it exits prematurely |
|
| 28 |
+Restart=on-failure |
|
| 29 |
+StartLimitBurst=3 |
|
| 30 |
+StartLimitInterval=60s |
|
| 27 | 31 |
|
| 28 | 32 |
[Install] |
| 29 | 33 |
WantedBy=multi-user.target |
| ... | ... |
@@ -23,6 +23,10 @@ TimeoutStartSec=0 |
| 23 | 23 |
Delegate=yes |
| 24 | 24 |
# kill only the docker process, not all processes in the cgroup |
| 25 | 25 |
KillMode=process |
| 26 |
+# restart the docker process if it exits prematurely |
|
| 27 |
+Restart=on-failure |
|
| 28 |
+StartLimitBurst=3 |
|
| 29 |
+StartLimitInterval=60s |
|
| 26 | 30 |
|
| 27 | 31 |
[Install] |
| 28 | 32 |
WantedBy=multi-user.target |