docker-compose:服务服务“ web”的不受支持的配置选项 [英] docker-compose : Unsupported config option for services service: 'web'
本文介绍了docker-compose:服务服务“ web”的不受支持的配置选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在经历 Docker Compose入门
在第3步中,我制作了 docker-compose.yml
文件,如下所述:
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
但是当我运行时:
$ docker-compose up
我得到以下错误:
服务服务的不受支持的配置选项: 'web'
Unsupported config option for services service: 'web'
我在做什么错?我无法弄清楚发生了什么。
What am I doing wrong? I was not able to figure out what is going on.
推荐答案
在docker-中引入了对版本2撰写文件格式的支持。撰写版本1.6 ,于今年2月前后发布。
Support for the version 2 compose file format was introduced in docker-compose version 1.6, released around February of this year.
您从2015年7月开始使用1.3.3。
You're using 1.3.3, from July 2015.
您需要升级到较新的版本才能使用版本2格式配置文件。
You need to upgrade to a more recent version to use the version 2 format configuration files.
这篇关于docker-compose:服务服务“ web”的不受支持的配置选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文