This document is for informational purposes only
-- This document is out of date and some content is for informational purposes only
Modify the hosts file of the hostModify the container hostname value and image informationIt may cause watchtower to fail to update normally
# Linux
systemctl disable --now systemd-resolved
systemctl stop systemd-resolved
mv /etc/resolv.conf /etc/resolv.conf.bak
docker run -itd --name audch \
--restart=always \
-v /opt/hosts:/hosts \
-v /var/run/docker.sock:/var/run/docker.sock \
xrsec/audch
docker run -itd \
--name dnsmasq \
--restart always \
-p 53:53 \
-p 53:53/udp \
-p 8080:80 \
-v /opt/hosts:/hosts \
-e "HTTP_USER=admin" \
-e "HTTP_PASS=123456" \
xrsec/dnsmasq
docker network inspect --format='{{range .IPAM.Config}}{{.Gateway}}{{end}}' bridge
/etc/docker/daemon.json
docker0 IPAddress: 172.17.0.1
{
"dns": [
"172.17.0.1",
"8.8.8.8",
"8.8.4.4"
]
}
# /etc/resolv.conf
nameserver 172.17.0.1 # docker0 IPAddress
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 223.5.5.5
nameserver 223.6.6.6
nameserver 114.114.114.114
systemctl restart docker.service
nslookup dnsmasq.docker.shared
docker logs -f audch