A
A
anar662020-01-07 14:58:07
Domain Name System
anar66, 2020-01-07 14:58:07

How to access docker network dns from host?

Containers on the same network can communicate with each other by name. Is it possible to somehow access contacts by name on the host, having access to the network?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-01-07
@q2digger

you need some kind of service discovery, in which running containers will be registered, and also which can be a DNS server.
Consul on host, and consul-registrator on docker.

V
Vitaly Karasik, 2020-01-07
@vitaly_il1

Here https://dev.to/karlredman/resolve-docker-hostnames... there is an example of using dns-proxy-server, but I haven't tried it myself.
Consul, as suggested by Dmitry , is more popular.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question