@derNiklaas: I have stumbled upon a similar issue, but what I discovered was that I had two services setup towards a docker network, with one of the services configured with a static ipv4 assignment, while the other did not have a static IP assigned.
@derNiklaas: I have stumbled upon a similar issue, but what I discovered was that I had two services setup towards a docker network, with one of the services configured with a static ipv4 assignment, while the other did not have a static IP assigned.
The result of this configuration was that sometimes (particularly after hard-resets of the host system, like power outages), the second service dynamically got assigned the IP that the first service was supposed to be assigned statically, causing the first service to fail to start with an error "Error response from daemon: Address already in use", which sounds eerily familiar.
Originally posted by @andoks in https://github.com/docker/compose/issues/10926#issuecomment-2160329201
Run it
@derNiklaas: I have stumbled upon a similar issue, but what I discovered was that I had two services setup towards a docker network, with one of the services configured with a static ipv4 assignment, while the other did not have a static IP assigned.
@Bman7714 can you please provide a configuration so that we can test it on our side?
On reboot, docker engine is the only one responsible to recreate/restart containers. AFAICT it doesn't manages precedence for containers and as such can produce conflicts, typically using a random IP for a container which has no constraint, but then blocking another one which is configured with a fixed IP. Same could apply to port ranges vs fixed port. That can be considered a bug, or usability issue, but in all circumstances this isn't Docker Compose responsibility. Please report issue on github.com/moby/moby with a reproduction or illustration example