1 minutes reading
docker-compose handling circular dependency
docker-compose files you can have different keywords to indicate run time dependency.
links. The latter one is for handling network connection.
links keyword is needed to handles how traffic is directed into one direction.
can interfere with one another in terms of dependency. An error like this occurs when you want to run
Docker compose ERROR: Circular dependency between ....
It is an issue when
links disallowing the
docker-compose to start the service because different resources require a service to be running.
The general solution for this problem is to disabled the
links keywords and get the different services running first. In my understanding the
for the run time dependency. In sense what a service requires before it can be started:
A -> B -> C
In the sense: A requires B and therefor. But for the
links it's the other way around. Who needs a connects to whom
C -> B -> A
best regards, akendo