0

I have container A and B, when I do docker-compose restart I want it to start container A first and then container B. I specified the depends_on directive, but it seems to be ignored (I see it starting up container B first).

Running version 3.4 of the YML file which has 2 services (A, B).

Thank you

Robert Sinclair
  • 4,550
  • 2
  • 44
  • 46

1 Answers1

3

depends_on only waits, until a container has the state running, not until it is ready. See the official documentation on how to wait until a container is "ready".

mamen
  • 1,202
  • 6
  • 26