
I never used such a setup on a docker-compose stack. – the portability of the compose/swarm stack is compromised, as you need to create the external network before the stack can be startet – each instance of the compose/swarm stack will require its own external network – it is decouple from docker-compose or swarm stack lifecycles Of course an externaly created network has advantages and drawbacks: Is there a way to tell Compose not to attempt to shut down the network when doing docker-compose down? I do not see an argument that would allow for that. However, shutting down the services in the docker-compose-2.yml file yields the error above and fails the build. When the services in the docker-compose-2.yml file are started, Compose automatically joins them to the docker_default network just fine.

These are services like my API gateway, service registry, etc. In my case, Compose creates a docker_default network when services in the docker-compose-1.yml file start. When I stop the services that are in the pipeline, I get the error message in the subject line:ĮRROR: error while removing network: network docker_default id 1396097fbd6632558c746a5b539f2e79d59e5d1ce4b8b0b3870ef0bd174b9252 has active endpoints

There are a few services that are not a part of the pipeline that have been started by a separate compose file. I am setting up a CI pipeline and using Compose to start and stop services.
