gpt4 book ai didi

docker - 撰写文件版本错误

转载 作者:行者123 更新时间:2023-12-02 18:52:34 25 4
gpt4 key购买 nike

我从以下位置安装了Docker:https://store.docker.com/editions/community/docker-ce-desktop-windows

我下载了一些资源以与docker一起运行并运行docker-compose up

不幸的是,我看到了:

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 supported version ("2.0", "2.1", "3.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/

我检查了docker-compose版本,然后看到:
> docker-compose version
docker-compose version 1.11.1, build 7afaa436
docker-py version: 2.0.2
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016

我没有使用Docker的经验,但是我怀疑这里存在版本问题。但是我不知道如何升级docker-compose。我对吗?我该怎么办呢?

更新: docker-compose.yml像这样开始
version: '3.4'

services:
php:

最佳答案

* .yml文件的版本“3.1”之前都支持docker-compose version 1.11.1。 (您的配置是3.4)

docker-compose更新为最新(1.23.2)版本,以能够运行高达3.7的撰写文件

https://docs.docker.com/compose/install/#install-compose

关于docker - 撰写文件版本错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53612953/

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