Home > Mobile >  How docker deamon retry to make docker container up?
How docker deamon retry to make docker container up?

Time:08-06

If the docker container is failing and I want that docker deamon should retry it at least 3 times without giving manual docker run command this to us without manual intervention what I should do ?

CodePudding user response:

Make use of docker's restart policy. https://docs.docker.com/engine/reference/commandline/run/#restart-policies---restart

If finding out whether a container is up or not is a bit more complex than just noticing that the process has exited, use docker's healthcheck. https://scoutapm.com/blog/how-to-use-docker-healthcheck

CodePudding user response:

You don't need the $ if it's inside the (( )) for doing arithmetic.

I am still not able to understand how that dereferencing of var1 and var2 works

bash parses things differently inside the (( )), undoubtedly because it makes it much easier to read complex arithmetic expressions without the $.

  • Related