去安装无法在Dockerfile中找到我的内部软件包

So I'm trying to Dockerize my project which looks like this:

project/
  main.go
  package1/
  package2/
  package3/

And it also requires some outside packages such as github.com/gorilla/mux Note my project is internal on a github.company.com domain so I'm not sure if that matters. So here's my Dockerfile and yes, my GOPATH and GOROOT is set and PLEASE don't just tell me to read https://golang.org/doc/code.html. I have and am still am having this issue.

### STAGE 1: Build ###

FROM golang:1.10 as builder
WORKDIR /go/src/github.company.com/project-repo/project
COPY . .
RUN go get 
RUN go install <- ERROR HERE
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o executable -a -installsuffix cgo .

### STAGE 2: Setup ###

FROM python:3.6-alpine
COPY --from=builder /go/src/github.company.com/project-repo/project/executable /api/executable
CMD ["/api/executable"]

Then I run:

docker build -t myapp .

And get this error:

main.go: cannot find package github.company.com/project-repo/project/package1 in any of:
/usr/local/go/src/github.company.com/project-repo/project/package1 (from $GOROOT)
/go/src/github.company.com/project-repo/project/package1 (from $GOPATH)

And keep in mind those paths are correct. Why can't go install packages that are within itself?? Main.go imports package1, but for sure reason "go install" doesn't install packages inside itself..

did you make(mkdir) the WORKDIR before setting its value?

Wow, golang really is picky about paths! It was just that I had assigned my working directory to the wrong place. There was another file in the tree:

WORKDIR /go/src/github.company.com/COMPANY/project-repo/project