mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-23 07:21:14 +02:00
app-emulation/docker: restart on-failure
This also syncs a few other small changes from upstream. See https://github.com/moby/moby/pull/30210 for the network-online change / bugs references. There doesn't appear to be a reason the socket's user differed from upstream, so there's no intended meaning to that change beyond syncing with upstream.
This commit is contained in:
parent
39247c7945
commit
9c0f911e27
@ -1,7 +1,8 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Docker Application Container Engine
|
Description=Docker Application Container Engine
|
||||||
Documentation=http://docs.docker.com
|
Documentation=http://docs.docker.com
|
||||||
After=containerd.service docker.socket network.target
|
After=containerd.service docker.socket network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
Requires=containerd.service docker.socket
|
Requires=containerd.service docker.socket
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@ -24,6 +25,12 @@ TasksMax=infinity
|
|||||||
TimeoutStartSec=0
|
TimeoutStartSec=0
|
||||||
# set delegate yes so that systemd does not reset the cgroups of docker containers
|
# set delegate yes so that systemd does not reset the cgroups of docker containers
|
||||||
Delegate=yes
|
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]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -5,7 +5,7 @@ PartOf=docker.service
|
|||||||
[Socket]
|
[Socket]
|
||||||
ListenStream=/var/run/docker.sock
|
ListenStream=/var/run/docker.sock
|
||||||
SocketMode=0660
|
SocketMode=0660
|
||||||
SocketUser=docker
|
SocketUser=root
|
||||||
SocketGroup=docker
|
SocketGroup=docker
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user