I have several containers I'm running with Docker Compose. Two of them need to talk to each other, so I've linked them like this in docker-compose.yml
:
serviceone:
links:
- servicetwo
servicetwo:
links:
- serviceone
But, it throws an error saying "Circular import between x and y".
This post solves the issue for people who are using Linux: how to link docker container to each other with docker-compose
Because it makes use of /var/run/docker.sock
, this doesn't work on Mac because on Mac, Docker is running in a VM, and /var/run/docker.sock
doesn't exist. How can I fix this circular import problem on Mac?