问题
I am going through getting started page for docker-compose: https://docs.docker.com/compose/gettingstarted/
In Step 3, I made a docker-compose.yml file as described:
version: '2'
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
depends_on:
- redis
redis:
image: redis
But when I run:
$ docker-compose up
I get following error:
Unsupported config option for services service: 'web'
I am not able to figure out what is going on. Any help?
Thank you
回答1:
Support for the version 2 compose file format was introduced in docker-compose version 1.6, released around February of this year.
You're using 1.3.3, from July 2015.
You need to upgrade to a more recent version to use the version 2 format configuration files.
来源:https://stackoverflow.com/questions/36724948/docker-compose-unsupported-config-option-for-services-service-web