docker-dnsmasq使用

Posted nihaorz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker-dnsmasq使用相关的知识,希望对你有一定的参考价值。

docker-dnsmasq支持通过web页面配置域名映射,镜像地址:https://hub.docker.com/r/jpillora/dnsmasq

使用步骤如下:

1、在Docker宿主上创建 /opt/dnsmasq.conf 配置文件

touch /opt/dnsmasq.conf

2、docker run启动容器

docker run     --name dnsmasq     -d     -p 53:53/udp     -p 5380:8080     -v /opt/dnsmasq.conf:/etc/dnsmasq.conf     --log-opt "max-size=100m"     -e "HTTP_USER=admin"     -e "HTTP_PASS=123456"     --restart always     jpillora/dnsmasq

HTTP_USER:web页面登录的管理员帐号

HTTP_PASS:web页面登录的管理员密码

3、通过 ip:5380 地址访问web页面,使用帐户密码登录后在线编辑 dnsmasq.conf 文件

我的dnsmasq.conf配置文件内容如下:

server=172.16.20.150
address=/test.gfstack.geo/192.168.36.158

 
项目地址:https://github.com/jpillora/docker-dnsmasq

 

以上是关于docker-dnsmasq使用的主要内容,如果未能解决你的问题,请参考以下文章