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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM