How to link two docker containers which are spawned with two different docker-compose.yml
I have two containers. Each one is spawned in two different docker-compose. How can I link between these containers.
Example: in a single docker-compose
input: build: InputBuffer links: - queue - output ports: - "30005:30005/udp"
But in the links part, I want to link to another container which is spawned by another docker-compose.yml in the same host.
One Solution collect form web for “How to link two docker containers which are spawned with two different docker-compose.yml”
You should use
external_links. From the docs:
Link to containers started outside this docker-compose.yml or even
outside of Compose, especially for containers that provide shared or