update dnsmasq

This commit is contained in:
Newnius 2020-01-02 11:20:00 +08:00
parent e79e626ab7
commit bdd7ab6564

View File

@ -2,8 +2,6 @@
## Deploy ## Deploy
#### Run as Server
```bash ```bash
docker run \ docker run \
--name dnsmasq \ --name dnsmasq \
@ -11,8 +9,18 @@ docker run \
--restart always \ --restart always \
--cap-add=NET_ADMIN \ --cap-add=NET_ADMIN \
--publish 53:53/udp \ --publish 53:53/udp \
--net host \
--mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly \ --mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly \
--mount type=bind,src=/data/dnsmasq/,dst=/etc/dnsmasq.d/ \ --mount type=bind,src=/data/dnsmasq/,dst=/etc/dnsmasq.d/ \
newnius/dnsmasq newnius/dnsmasq
``` ```
`--net host` is required, without which in other containers we may get `nslookup: can't resolve '(null)': Name does not resolve` error and would see following errors when `dig`
```
/ # dig @192.168.0.3 blog.newnius.com
;; reply from unexpected source: 172.17.0.1#53, expected 192.168.0.3#53
;; reply from unexpected source: 172.17.0.1#53, expected 192.168.0.3#53
;; reply from unexpected source: 172.17.0.1#53, expected 192.168.0.3#53
```