Query docker embedded dns from host

后端 未结 3 808
太阳男子
太阳男子 2021-02-05 18:14

Does anybody know a way to query the embedded dns server that the docker daemon uses. I\'m experimenting with packetbeats and it would be useful if I could replace docker ip add

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 19:12

    Another way would be to use docker-dns. It's a docker container that exposes a dns server that resolves the docker containers.

    Running it is as simple as

    docker run -d --name dns -v /var/run/docker.sock:/docker.sock phensley/docker-dns
    

提交回复
热议问题