Compose: Restarting Unhealthy Containers

Created on 24 Apr 2019  路  5Comments  路  Source: docker/compose

There was this one about 2 years ago on that topic https://github.com/docker/compose/issues/4826

It looks like Docker Compose is pointing to Docker and Docker is pointing to orchestration tools.

Is it possible to have restart policy to depend on health status? It looks like the job for Docker Compose for me.

Also, it was there for version 2 compose files in depends_on section.

stale

Most helpful comment

Please open again as it is still relevant

All 5 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it had not recent activity during the stale period.

Please open again as it is still relevant

When it will be able to?

Imho there is no way to do this in compose, because compose is not running during runtime of a container or services (except you omit -d on up).
To monitor the health state of a container and do actions on change you need to have a daemon.
Implementing those actions into docker daemon looks much smarter to me.
moby/moby#28400

Was this page helpful?
0 / 5 - 0 ratings