Is it possible to disable manual docker container restarts?

  Kiến thức lập trình

We have a few containers in production which occasionally have issues and need to be restarted. However, there are a few additional steps we need to take when doing restarts due to service dependencies and how the service works, so we use Jenkins jobs to handle rebooting the service. Consequently, going in and using the docker restart syntax will leave the service in a bad state.

Not all of our ops team knows this though, as they’re constantly onboarding and replacing team members. I would love to disable the docker restart syntax and if possible add a friendly “This container doesn’t allow restarts, please contact devs” kind of message, but all my searches just turn up results with how to disable auto-restart, which is a different problem

LEAVE A COMMENT