monitor - How do we set docker containers to restart on reboot and on-failure? -
i docker containers come up
- on
host reboot
or whendocker restarted
on host on failure
maximum retries
.
i aware docker restart policies unless-stopped
, always
in same direction want them fail after maximum retries.
thinking of below steps solution
no restart policy
on docker containerssystemd-docker
restart containerson-failure
, enabled on reboot.
is there better way this?
i docker containers come on host reboot or when docker restarted on host
this not complete answer, know docker 1.12 add daemonless container mode
(pr 23213):
daemonless containers
starting docker 1.12 containers can run without docker or
containerd
running.
allows docker daemon exit, upgraded, or recover crash without affecting running containers on system.to enable functionality need add
--live-restore
flag when launchingdockerd
. ensure docker not kill containers on graceful shutdown or on restart leaving containers running.
Comments
Post a Comment