Is there a way I can reach my docker containers using names instead of ip addresses?
I\'ve heard of pipework and I\'ve seen some dns and hostname type options for do
Create a new bridge network other than docker0, run your containers inside it and you can reference the containers inside that network by their names.
Docker daemon runs an embedded DNS server to provide automatic service discovery for containers connected to user-defined networks. Name resolution requests from the containers are handled first by the embedded DNS server.
Try this:
docker network create
docker run --net --name test busybox nc -l 0.0.0.0:7000
docker run --net busybox ping test
First, we create a new network. Then, we run a busybox container named test listening on port 7000 (just to keep it running). Finally, we ping the test container by its name and it should work.