본문 바로가기
에러 디버그 기록

The Compose file is invalid

by jphwany 2022. 10. 11.

because:
Service nginx has neither an image nor a build context specified. At least one must be provided

-> 컴포즈 파일에 컨텍스트가 존재하지 않아서 생기는 오류

docker-compose.yml에 context를
추가(or 수정)해줘야한다

context는 Dockerfile이 포함된 디렉토리 경로를 의미한다 
Dockerfile이 패키지 구성 상 최상단에 위치하기 때문에
나의 경우, docker-compose.yml을 
Dockerfile과 동일한 최상단에 구성해놨고

context는  .  을 입력해서 해결했다
(현재 디렉토리)

댓글