gpt4 book ai didi

docker - 不支持docker-compose中的版本

转载 作者:行者123 更新时间:2023-12-04 15:18:15 24 4
gpt4 key购买 nike

我尝试安装this docker-compose配置。如您所见,它具有版本3。
当我使用docker-compose build --pull运行它时,出现以下错误:

ERROR: Version in "./docker-compose.yml" is unsupported. 
You might be seeing this error because you're using the wrong Compose file version.
Either specify a version of "2" (or "2.0") and place your service definitions
under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

如果我从.yml中删除了版本,则会收到以下错误消息:
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for volumes: 'conf.d'
Unsupported config option for services: 'letsencrypt-companion'
Unsupported config option for networks: 'proxy-tier'

阅读文档后,我的第一个想法是关于版本不兼容的。所以我已经将docker更新为 17.9.1-ce
这是 docker-compose的版本:
docker-compose version 1.8.0, build unknown

但是错误是相同的,我对此一无所知。
操作系统:Ubuntu 17.10。

最佳答案

您需要升级docker compose以及可能的docker引擎。 Docker compose 3.0文件需要Docker引擎1.13.0+版本(以及该版本的compose)。有关更多信息,请参阅:https://docs.docker.com/compose/compose-file/,特别是Compose和Docker Engine兼容性矩阵。

请注意,版本1.8.0在版本1.8.0之后。它是1.18.0版,而不是1.1.8.0版。次要版本号不断增加(例如1.8.0-> 1.9.0-> 1.10.0-> 1.11.0)。

最新版本(撰写本文时)为2017年12月19日发行的1.18,2017年7月27日发行的1.8(https://github.com/docker/compose/releases)。您使用的旧版本的docker与docker-compose 3文件不兼容。

此外,他们更改了Docker主机的编号以反射(reflect)发布日期:17.9.0是2017年9月发布的版本(第一个数字是年份,第二个数字是月份)。

关于docker - 不支持docker-compose中的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47972328/

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