Closed typoworx-de closed 4 weeks ago
bridge
network is a special one and you can't combine it with user-defined networks.
To get both services in compose and your dind builder container share a common network, you can either configure the builder to join the network defined for your compose stack, or run ALL containers in your compose stack with the default bridge
network.
Description
I'm struggling around with this problem:
I have a docker-compose stack containing:
I have a internal network to inter connect some (other containers as well) and 'registry-ui' with registry:2. Initially I had port 5000 exposted to my host which works fine for registry.
But working with docker:dind build this container invoked by f.e. gitlab-ci-local runner this instance won't have access to my host exposed registry (running in separate compose-stack).
I was trying to attach registry:2 service to internal network and assign default-bridge docker0 to it. It works doing the attach manually. It also works by disabling network for registry:2 service and replacing it with 'network_mode: bridge' flag. But then the registry-ui frontend cannot connect anymore.
Is it somehow possible to attach the bridge 0 as external network by name or label 'com.docker.network.bridge.default_bridge' to my stack as separate network I can attach to the registry:2 container or even attach it implicit only to that container directly while having another internal network attached?
Obviously this works as it works when I'm doing manual attach. But trying to combine network with bridge and external: true won't work.
Steps To Reproduce
Compose Version
Docker Environment
Anything else?
No response