I’m sorry if this is a dumb question, but I’ve tried researching this and, as far as I understand, I’m tweaking all the right dials.
I have two containers being run by two different projects. One is run manually via
docker run ... with a container name of
edm. The other is being spun up via docker-compose with the container name
In my docker-compose file I’ve set the network-mode for the
edm-db project to be
bridge. As far as I understand, this is the default for container run via
docker run ....
When I run
docker network inspect bridge, I see that these two containers have been created and are connected to this network with the proper names.
However, inside of
edm, I can’t seem to be able to resolve the
edm-db hostname. I can lookup the IP Address of this container (
172.17.0.3) and hit it directly from
edm, but not with a logical container name. This makes it annoying to configure if during development if I have to bring up
edm-db again because it might have a different IP Address.
My understanding is that once two containers are running on the same network, they should be reachable by their container names. Am I misunderstanding this or doing something wrong?