start docker container after traefik is up an running

22 Views Asked by At

I have traefik in one docker file and several other container using traefik in other docker files for the sake of organization. When my host launches, sometimes one of the client containers seems to start before traefik is up and running and therefore doesn't register correctly. When restarting the container, everything works. The timing seems to be kind of random, as most times it works fine in the correct order.

How can I implement a check in my client docker container, so that it only starts when traefik is up and running? Health check with ping is already working with traefik.

0

There are 0 best solutions below