2017-12-24 4 views
1

Python, Django 등과 같은 몇 가지 사항을 설정 한 후 Docker를 설치 한 직후 웹 서버가 실행되기 전에 오류가 발생했습니다.거기에 있어도 run_web.sh를 찾을 수 없습니다.

웹 서버를 실행하려면 run_web.sh이라는 스크립트를 작성해야합니다. docker-compose.yml에서 웹 서버를 실행하려면 exec run_web.sh 명령을 실행하십시오. 이 명령을 실행하면 아래와 같은 에러가 발생합니다 : run_web.sh 파일 docker-compose.yml 같은 프로젝트의 내 루트 디렉토리에

Starting portalapi_web_1 ... error 

ERROR: for portalapi_web_1 Cannot start service web: oci runtime error: container_linux.go:265: starting container process caused "exec: \"./run_web.sh\": stat ./run_web.sh: no such file or directory" 


ERROR: for web Cannot start service web: oci runtime error: container_linux.go:265: starting container process caused "exec: \"./run_web.sh\": stat ./run_web.sh: no such file or directory" 

ERROR: Encountered errors while bringing up the project. 

가, 그것을 찾을 수 없습니다. 문제가 무엇인지 모릅니다. 내 루트 디렉토리에서 exec run_web.sh을 실행할 때

는해도, 여전히 얻을 오류 : Not Found

enter image description here

+0

bash의 현재 디렉토리에서 파일을 실행하는 올바른 구문은'./run_web.sh'입니다. bash에는'exec '이 없어야합니다. –

답변

1

당신의 ENTRYPOINT 당신이 그 다음, docker image inspect <yourImage> 확인 간단하게 시도 할 수 있습니다 기본 일 (/bin/sh -c) 인 경우 CMD A와 :

/full/path/of/run_web.sh 

그런 식으로, 당신은 당신이 시작하고 싶은 직접 참조합니다.

관련 문제