DevOps

ERROR: The Compose file './docker-compose.yml' is invalid because

iamreo 2019. 6. 12. 16:21
반응형

 docker-compose up 실행시 아래와 같은 에러가 발생하여 삽질을 하였다.

ERROR: The Compose file './docker-compose.yml' is invalid because:

Invalid top-level property "manager". Valid top-level sections for this Compose file are: version, services, networks, volumes, secrets, configs, and extensions starting with "x-".

You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.

For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

설명처럼 version 을 소수점으로 변경도 해보고, 이런 저런 별짓을 다해봤지만 ...

결론은 띄어쓰기 문제였다.

yaml 파일에서  같은 레벨의 띄어쓰기가 맞지않아서 에러가 나는 거였음... 

위 에러날때 동급의 항목이 같은 띄어쓰기로 되어 있는지 , 더 앞칸으로 되어 있는건 아닌지 확인해 보면 해결될듯함

 

 

 

반응형