compose icon indicating copy to clipboard operation
compose copied to clipboard

How to sent notification when a container is exit on it's own

Open fzn0x opened this issue 4 years ago • 2 comments

Sometimes a container getting exit from it's own, how to prevent that with something (say like notifications) so we can re-up the container?

Is there a way to solve this anomaly? Thank you.

fzn0x avatar Apr 19 '22 20:04 fzn0x

@fzn0x

You might want to look at the following resources to achieve what you want:

https://docs.docker.com/compose/compose-file/#restart

https://docs.docker.com/engine/reference/builder/#healthcheck

https://docs.docker.com/engine/reference/commandline/events/

maxcleme avatar Apr 20 '22 06:04 maxcleme

@fzn0x

You might want to look at the following resources to achieve what you want:

https://docs.docker.com/compose/compose-file/#restart

https://docs.docker.com/engine/reference/builder/#healthcheck

https://docs.docker.com/engine/reference/commandline/events/

Thanks, healthcheck looks good!

fzn0x avatar Apr 20 '22 21:04 fzn0x