如何使用 docker-compose.yml 文件在 tutum 中创建堆栈?

How to create stack in tutum with docker-compose.yml file?

我正尝试按如下方式构建堆栈:

redis:
  image: redis
  ports:
    - '6379'
app:
  build: .
  links:
    - redis

当我按下 "Create Stack" 按钮时,出现此错误:

Oops!

Service 'app': Value {u'build': u'.', u'links': [u'redis'], u'name': u'app'} for field '<obj>' contains additional property 'build' not defined by 'properties' or 'patternProperties' and additionalProperties is False. See 'https://support.tutum.co/support/solutions/articles/5000583471' for more details

有人可以帮我解决这个问题吗?

Tutum documentation 在页面底部声明如下:

Docker-compose non-supported keys

Tutum.yml has been designed with docker-compose.yml in mind to maximize compatibility, but the following keys are not supported:

build
external_links
env_file

This clearly states that build is not a supported key,这也是您的错误消息所说的。看来您必须从文件中删除 build 密钥。