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

Posted chucklu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker-compose gives ERROR: Cannot locate specified Dockerfile: Dockerfile相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

I will give you ten percent discount ,这句话可以翻译成:我可以给你打九折。吗?

css 更改Give WP插件的一些默认值

A. Nephren gives a riddle

Give Candies(费马小定理)

传奇版本自动穿背包中的装备脚本

2018焦作网络赛G-Give Candies