Docker-Compose file has yaml.scanner.ScannerError

后端 未结 17 2241
情话喂你
情话喂你 2021-02-01 12:04

compose.yml file, which looks like this:

version: \'2\'
services:
  discovery-microservice:
    build: discovery-microservice
      context: /discov         


        
17条回答
  •  灰色年华
    2021-02-01 12:52

    Ok, I wasted around 3 hours to debug a similar issue.

    If you guys ever get the below error

    ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
    in ".\docker-compose.yml", line 2, column 9
    

    It's because a space is needed between

    version:'3' <-- this is wrong

    version: '3' <-- this is correct.

    Also, if you are using eclipse, do yourself a favor and install the YEdit YAML editor plugin

提交回复
热议问题