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).

 

相关文章:

  • 2021-04-24
  • 2021-08-10
  • 2021-08-27
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-20
  • 2021-10-03
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2021-06-20
相关资源
相似解决方案