monitor - How do we set docker containers to restart on reboot and on-failure? -
i docker containers come up
- on
host rebootor whendocker restartedon host on failuremaximum 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 policyon docker containerssystemd-dockerrestart 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
containerdrunning.
allows docker daemon exit, upgraded, or recover crash without affecting running containers on system.to enable functionality need add
--live-restoreflag when launchingdockerd. ensure docker not kill containers on graceful shutdown or on restart leaving containers running.
Comments
Post a Comment