简体   繁体   English

docker-compose中的版本不受支持

[英]Version in docker-compose is unsupported

I try to install this docker-compose configuration. 我尝试安装这个 docker-compose配置。 As you can see, it has version 3. When I run this with docker-compose build --pull , I got this error: 正如你所看到的,它有版本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/

If I remove version from .yml, then I get such error: 如果我从.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'

After reading documentation my first thoughts was about version incompatibility. 阅读文档后,我的第一个想法是版本不兼容。 So I've updated docker to 17.9.1-ce . 所以我将17.9.1-ce更新为17.9.1-ce
And here is version of docker-compose : 这里是docker-compose版本:

docker-compose version 1.8.0, build unknown

But errors are the same and I really have no idea about this. 但错误是一样的,我真的不知道这个。 Operation System: Ubuntu 17.10. 操作系统:Ubuntu 17.10。

You need to upgrade docker compose and possibly the docker engine. 您需要升级docker compose以及docker引擎。 Docker compose 3.0 files require docker engine version 1.13.0+ (and that version of compose). Docker compose 3.0文件需要docker engine version 1.13.0+(以及那个版本的compose)。 For more information see: https://docs.docker.com/compose/compose-file/ , specifically the Compose and Docker Engine compatibility matrix. 有关更多信息,请参阅: https//docs.docker.com/compose/compose-file/ ,特别是Compose和Docker Engine兼容性矩阵。

Please note that version 1.18.0 comes after versions 1.8.0. 请注意,版本1.8.0之后是版本1.18.0。 It's version 1.18.0, not version 1.1.8.0. 它的版本是1.18.0,而不是版本1.1.8.0。 The minor version number just keeps increasing (eg 1.8.0 -> 1.9.0 -> 1.10.0 -> 1.11.0). 次要版本号不断增加(例如1.8.0 - > 1.9.0 - > 1.10.0 - > 1.11.0)。

The latest version (when writing this) is 1.18, released on December 19 2017, 1.8 was released on July 27 2017 ( https://github.com/docker/compose/releases ). 最新版本(写这篇文章时)是2017年12月19日发布的1.18,2017年7月27日发布了1.8( https://github.com/docker/compose/releases )。 You are using an old version of docker that is not compatible with docker-compose 3 files. 您正在使用与docker-compose 3文件不兼容的旧版docker。

Also, they changed the numbering of the docker enigines to reflect the release date: 17.9.0 is the September 2017 release (first number is the year, second number is the month). 此外,他们更改了docker enigines的编号以反映发布日期:17.9.0是2017年9月发布(第一个数字是年份,第二个数字是月份)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM