2017-12-26 29 views
-1

신입생 & Beego. 프로젝트에서 실행 godep save :기본 도커 파일로 beego 도커 이미지를 빌드 할 때 오류 표시 : 'godep : Godeds가 발견되지 않음 (또는 상위 디렉토리에 있음)'

godep: No Godeps found (or in any parent directory)

빌드 정보는 다음과 같습니다 :

Sending build context to Docker daemon 13.6MB 
Step 1/9 : FROM library/golang 
---> 138bd936fa29 
Step 2/9 : RUN go get github.com/tools/godep 
---> Running in 9003355d967f 
---> bae9e4289f9b 
Removing intermediate container 9003355d967f 
Step 3/9 : RUN CGO_ENABLED=0 go install -a std 
---> Running in 63d367bd487e 
---> 3ce0b2d47c0a 
Removing intermediate container 63d367bd487e 
Step 4/9 : ENV APP_DIR $GOPATH/src/TestProject 
---> Running in 53ddc4661a07 
---> 528794352eb0 
Removing intermediate container 53ddc4661a07 
Step 5/9 : RUN mkdir -p $APP_DIR 
---> Running in 37718f358f5c 
---> ef9332ca086c 
Removing intermediate container 37718f358f5c 
Step 6/9 : ENTRYPOINT (cd $APP_DIR && ./TestProject) 
---> Running in 059c06321914 
---> 8538ea070871 
Removing intermediate container 059c06321914 
Step 7/9 : ADD . $APP_DIR 
---> df129482c662 
Step 8/9 : RUN cd $APP_DIR && CGO_ENABLED=0 godep go build -ldflags '-d -w -s' 
---> Running in 50b29d1307b5 
godep: No Godeps found (or in any parent directory) 
The command '/bin/sh -c cd $APP_DIR && CGO_ENABLED=0 godep go build -ldflags '-d -w -s'' returned a non-zero code: 1 

답변

0

이 솔루션은 매우 간단합니다

내가 beego의 기본 고정 표시기 파일로 고정 표시기 이미지를 구축,이 오류를 보여줍니다 로컬에서는 프로젝트에 Godeps이라는 새 폴더를 만듭니다. 파일 : Godeps.json이 들어 있습니다. 그런 다음 docker build .을 다시 실행하면 도커 이미지가 나타납니다.