我正在尝试使以下内容docker-compose.yaml
在我的QNAP
容器站上运行。
以下部分正在工作,但在“重新启动:除非停止”之后,混乱开始了。
version: '3'
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "65003:53/tcp"
- "65002:53/udp"
- "65001:67/udp"
- "65000:80/tcp"
environment:
TZ: 'Berlin'
WEBPASSWORD: 'password'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole/:/etc/pihole/'
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
restart: unless-stopped
qnet_dhcp:
image: alpine
command: ifconfig eth0
networks:
- qnet-dhcp
qnet_static:
image: alpine
command: ifconfig eth0
networks:
qnet-static:
ipv4_address: 192.168.178.2
networks:
qnet-dhcp:
driver: qnet
ipam:
driver: qnet
options:
iface: "eth0"
qnet-static:
driver: qnet
ipam:
driver: qnet
options:
iface: "eth0"
config:
- subnet: 192.168.178.0/24
gateway: 192.168.178.1
我直接从 QNAP https://qnap-dev.github.io/container-station-api/qnet.html获得了网络信息,并尝试使用http://www.yamllint.com/进行验证,但它没有一起工作。 错误 行 24