Configure fig to run one container before another

128 views Asked by At

I'm using bower inside its own dedicated container. I'm also using grunt in its own container.

I configured my App with fig and it works great except for one case: When bower isn't fast enough grunt will fail because of some needed files.

Is there any way/trick to wait with grunts execution until the bower-container has finished?

1

There are 1 answers

0
cthulhu On BEST ANSWER

Just a few ideas:

You can wrap grunt execution in a bash script that waits for bower to complete - for example bower creates a file on a shared volume on exit.

Or you can create a 'dispatcher' image, that launches your bower container and grunt container in sequence using docker API, or command line and shared docker socket.

Or, and I guess it is the best option, run bower and then grunt inside a single container, because I don't see any reason to run them separately.