docker-dnsmasq使用

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

使用步骤以下:github

一、在Docker宿主上建立 /opt/dnsmasq.conf 配置文件web

touch /opt/dnsmasq.conf

二、docker run启动容器docker

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页面登陆的管理员账号spa

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

三、经过 ip:5380 地址访问web页面,使用账户密码登陆后在线编辑 dnsmasq.conf 文件code

个人dnsmasq.conf配置文件内容以下:server

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

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

相关文章
相关标签/搜索