gpt4 book ai didi

docker - 撰写文件 './docker-compose.yml'无效,因为: Unsupported config option

转载 作者:行者123 更新时间:2023-12-02 17:50:22 28 4
gpt4 key购买 nike

我有以下docker-compose文件并遇到此错误,

The Compose file './docker-compose.yml' is invalid because: Unsupported config option

docker-compose.yml:
version: "3"

services:
webserver:
build:
context: ./bin/webserver
container_name: 'png-webserver'
restart: 'always'
ports:
- "81:81"
- "444:444"
links:
- mysql
volumes:
- /var/www/vhost/dev.ivacy.com:/var/www/html
- ${PHP_INI-./config/php/php.ini}:/usr/local/etc/php/php.ini
- ${VHOSTS_DIR-./config/vhosts}:/etc/apache2/sites-enabled
- ${LOG_DIR-./logs/apache2}:/var/log/apache2
networks:
vpcbr:
ipv4_address: 10.5.0.5

mysql:
build: ./bin/mysql
container_name: 'png-mysql'
restart: 'always'
ports:
- "3306:3306"
volumes:
- /var/www/docker-compose-lamp/bin/mysql/db:/docker-entrypoint-initdb.d
- ${MYSQL_DATA_DIR-./data/mysql}:/var/lib/mysql
- ${MYSQL_LOG_DIR-./logs/mysql}:/var/log/mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ivacy_muti_site
MYSQL_USER: root
MYSQL_PASSWORD: password
networks:
vpcbr:
ipv4_address: 10.5.0.6
depends_on:
- mysql

phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: 'png-phpmyadmin'
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
ports:
- '8081:81'
volumes:
- /sessions
networks:
vpcbr:
ipv4_address: 10.5.0.7
depends_on:
- mysql
- webserver

redis:
container_name: 'png-redis'
image: redis:latest
ports:
- "6379:6379"
networks:
vpcbr:
ipv4_address: 10.5.0.8
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1

最佳答案

您已经将networks缩进了services块中。

关于docker - 撰写文件 './docker-compose.yml'无效,因为: Unsupported config option,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56225523/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com