title: Docker build fails with local go package import
body: <p>I have built a go application which has a main package and an authentication package. The authentication package is imported in main file. The directory structure is as follows,  </p>
  
  <p><a href="https://i.stack.imgur.com/OkQ0K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OkQ0K.png" alt="enter image description here"></a></p>
  
  <p>and the docker file contents are as follows,</p>
  
  <pre><code>FROM golang
  
  COPY ./  /Users/venkat/go/src/github.com/Athavankanapuli/interflow_api/loginservice/app
  WORKDIR  /Users/venkat/go/src/github.com/Athavankanapuli/interflow_api/loginservice/app
  RUN go get github.com/go-kit/kit/endpoint
  RUN go get golang.org/x/oauth2
  RUN go get github.com/go-kit/kit/endpoint
  RUN go get gopkg.in/mgo.v2/bson 
  RUN go install ./...
  RUN go build 
  
  EXPOSE 8080
  CMD [ "./app" ]
  </code></pre>
  
  <p>The docker does all the imports properly but it fails to read the authentication package.
  The <strong>$GOPATH</strong> refers to <strong>/Users/venkat/go</strong>
  The terminal command <strong>docker build -t interflow  .</strong> gives the following error output,</p>
  
  <p><a href="https://i.stack.imgur.com/IQMsV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IQMsV.png" alt="enter image description here"></a></p>
  
  <p>How to fix this error and make the local authentication package gets included in the build? Or is there any other better way of writing the dockerfile for the proper build?</p>