码迷,mamicode.com
首页 > 其他好文 > 详细

docker-compose gives ERROR: Cannot locate specified Dockerfile: Dockerfile

时间:2020-06-12 19:55:52      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:nes   HERE   pre   问题   not   ext   code   oca   for   

docker-compose gives ERROR: Cannot locate specified Dockerfile: Dockerfile

Here is how to specify dockerfile. Sorry I cannot do it in comments as formatting is not supported over there.

https://docs.docker.com/compose/compose-file/#context

app:
    build:
      context: app
      dockerfile: Dockerfile

 

‘./docker-compose.yml‘, service must be a mapping, not a NoneType

这里需要注意排版问题

YAML is indentation dependent. This

services:
zoo1:

is a mapping with two keys that both map to null (i.e. None in Python).

Whereas:

services:
   zoo1:

is a mapping nested in a mapping. The key ‘services‘ has as value a mapping with key zoo1 (which again has a value null).

 

docker-compose gives ERROR: Cannot locate specified Dockerfile: Dockerfile

标签:nes   HERE   pre   问题   not   ext   code   oca   for   

原文地址:https://www.cnblogs.com/chucklu/p/13106745.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!