gpt4 book ai didi

Docker-compose 遇到标签问题

转载 作者:行者123 更新时间:2023-12-01 09:46:48 25 4
gpt4 key购买 nike

我正在尝试设置 Traefik使用其文档中显示的示例反向代理。当我尝试启动“whoami”服务时,出现以下错误:

Creating test_whoami_1 ... 

ERROR: for test_whoami_1 dictionary update sequence element #0 has length 22; 2 is required

ERROR: for whoami dictionary update sequence element #0 has length 22; 2 is required
Traceback (most recent call last):
File "bin/docker-compose", line 6, in <module>
File "compose/cli/main.py", line 68, in main
File "compose/cli/main.py", line 121, in perform_command
File "compose/cli/main.py", line 952, in up
File "compose/project.py", line 455, in up
File "compose/parallel.py", line 70, in parallel_execute
ValueError: dictionary update sequence element #0 has length 22; 2 is required
Failed to execute script docker-compose

示例 docker-compose.yml 可以在 Traefik 文档中找到:
测试/docker-compose.yml
version: '3.3'

services:
whoami:
image: emilevauge/whoami
networks:
- web
labels:
- "traefik.backend=whoami"
- "traefik.frontend.rule=Host:whoami.docker.localhost"

networks:
web:
external:
name: traefik_webgateway

traefik/docker-compose.yml
version: '3.3'

services:
proxy:
image: traefik:1.4.1
restart: always
ports:
- 80:80
- 8080:8080
command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./traefik.toml:/traefik.toml"
container_name: traefik

networks:
webgateway:
driver: bridge

使用以下 docker 和 docker-compose 版本:
Docker version 17.09.0-ce, build afdb6d4
docker-compose version 1.17.0, build ac53b73

最佳答案

解决方案:降级到docker-compose v1.16.1。

关于Docker-compose 遇到标签问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47094460/

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