Build Docker with Go app: cannot find package

前端 未结 6 709
独厮守ぢ
独厮守ぢ 2020-12-29 08:56

I have my Dockerfile in the root of directory with src/myapp folder, myapp contains myapp.go with main package.

Dockerfi

6条回答
  •  有刺的猬
    2020-12-29 09:10

    myapp needs to be in /go/src/myapp as suggested, or in /usr/local/go/src/myapp. You can add it in ADD section.

提交回复
热议问题