Pre-start script execution priority

Alan MorĂ¡n <bonzofenix at>

I am having trouble understanding when pre-start scripts ( should run.

The situation I am dealing with is the following:
I have a docker-registry-release that provisions an image and tries to
start it as a container against a docker deamon with a pre-start script.
I tried to set the docker job template before the docker-registry-image one
in my manifest so that it starts that job first but still the pre-script
runs before any other job gets started.

How could I handle this situation?



Kevin Ingvalson

I am also trying to understand the appropriate role/use of the pre-start scripts.

My current position/opinion is that it is a good execution point for managing state transition between job updates, but not for a dependency like mentioned here.

Possible simple answer: monit dependency
within the docker check process (assuming check process)
depends on docker-registry-image

Other possible answer if that dependency approach doesn't work.

I would couple the start of the docker-registry-image to some output of the docker job that indicates it has successfully started and is running. Essentially an explicit implementation of what a monit dependency also provides.