试图使用ssh将以下代码粘贴到.yml文件中,以访问运行openWRT的主机。我通过vim复制了它,我是否有可能从复制中得到奇怪的缩进错误?
当我试图运行容器时,我得到了“必须是映射”错误消息,在谷歌搜索后,大多数人似乎认为这是由于yml文件中的缩进错误造成的。如果下面的代码看起来是正确的,那么我可以发送我执行的其余命令。
有人能帮我排除这个错误吗?
更新:取消注释时区修复了它,相反,我得到了错误消息“清单列表条目中linux/mipsle没有匹配清单”,这意味着什么?
version: "3.3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:2021.09
hostname: pihole
environment:
# TZ: 'set timezone'
# WEBPASSWORD: 'set a secure password here or it will be random'
# Volumes store your data between container upgrades
volumes:
- './pihole/etc-pihole/:/etc/pihole/'
- './pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
- './pihole/var-log/:/var/log'
- './pihole/etc-cont-init.d/10-fixroutes.sh:/etc/cont-init.d/10-fixroutes.sh'
# 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
networks:
internal:
lan:
ipv4_address: 192.168.1.3
networks:
internal:
lan:
name: lan
driver: macvlan
driver_opts:
parent: br-lan.20
ipam:
config:
- subnet: 192.168.1.0/24发布于 2022-11-20 22:12:56
撰写文件的文档指出:
.
environment可以使用数组或地图..。
要使它(在句法层面上)发挥作用,我们可以:
environment: [],https://stackoverflow.com/questions/74512133
复制相似问题