version: '3.8'
services:
dnsmasq:
image: andyshinn/dnsmasq:latest
ports:
- "53:53/udp"
restart: always
command: >
bash -c "echo '
user=dnsmasq
listen-address=0.0.0.0
cache-size=10000
domain-needed
bogus-priv
no-resolv
server=219.146.1.66
' > /etc/dnsmasq.conf && dnsmasq -d -C /etc/dnsmasq.conf"
extra_hosts:
- "example.com:192.168.1.100"
- "test.example.com:192.168.1.101"
networks:
dnsmasq-network:
ipv4_address: 172.18.19.42
networks:
dnsmasq-network:
driver: bridge
ipam:
config:
- subnet: 172.18.19.0/24
name: dnsmasq-network
最后修改:2023 年 11 月 02 日
© 允许规范转载