CircleCI './docker-compose.yml' service 'version' 没有任何配置选项
CircleCI './docker-compose.yml' service 'version' doesn't have any configuration options
相关,但不重复:
我目前使用的 v2 docker-compose.yml
具有以下 circle.yml
:
machine:
services:
- docker
test:
post:
- docker build --rm=false -t zurfyx/repo:$CIRCLE_SHA1 .
- docker-compose run web npm test
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push zurfyx/repo:$CIRCLE_SHA1
CircleCI 给出以下输出:
docker-compose run web npm test
ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.
docker-compose run web npm test returned exit code 1
我尝试了出现在最近的 CircleCI 论坛 post 上的 following solutions,但我没能解决这个问题。
需要将docker和docker-compose升级到最新版本:
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
- pip install --upgrade pip
- pip install docker-compose
services:
- docker
为什么两者都有?
有人说用pip升级docker-compose到最新版本就可以了,显然不行(因为现在的DockerEngine CircleCI版本不支持,至少现在不支持) :
ERROR: The Docker Engine version is less than the minimum required by
Compose. Your current project requires a Docker Engine of version
1.10.0 or greater.
如果您只是升级 Docker 引擎,这没有任何区别,因为解析 v2 YAML 文档需要更高的 docker-compose 版本。
相关,但不重复:
我目前使用的 v2 docker-compose.yml
具有以下 circle.yml
:
machine:
services:
- docker
test:
post:
- docker build --rm=false -t zurfyx/repo:$CIRCLE_SHA1 .
- docker-compose run web npm test
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push zurfyx/repo:$CIRCLE_SHA1
CircleCI 给出以下输出:
docker-compose run web npm test
ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.
docker-compose run web npm test returned exit code 1
我尝试了出现在最近的 CircleCI 论坛 post 上的 following solutions,但我没能解决这个问题。
需要将docker和docker-compose升级到最新版本:
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
- pip install --upgrade pip
- pip install docker-compose
services:
- docker
为什么两者都有?
有人说用pip升级docker-compose到最新版本就可以了,显然不行(因为现在的DockerEngine CircleCI版本不支持,至少现在不支持) :
ERROR: The Docker Engine version is less than the minimum required by Compose. Your current project requires a Docker Engine of version 1.10.0 or greater.
如果您只是升级 Docker 引擎,这没有任何区别,因为解析 v2 YAML 文档需要更高的 docker-compose 版本。