monitor - How do we set docker containers to restart on reboot and on-failure? -


i docker containers come up

  1. on host reboot or when docker restarted on host
  2. 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

  1. no restart policy on docker containers
  2. systemd-docker restart containers on-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 launching dockerd. ensure docker not kill containers on graceful shutdown or on restart leaving containers running.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -