I try to create an image for my Golang application, but Docker just writes:
Step 7/9 : RUN go install ./accounting/server ---> Running in f998ba6a5efb can't load package: package grpcProjects/multiService/accounting/server: cannot find package "grpcProjects/multiService/accounting/server" in any of: /usr/local/go/src/grpcProjects/multiService/accounting/server (from $GOROOT) /go/src/grpcProjects/multiService/accounting/server (from $GOPATH)
FROM golang:1.10.4 ADD . /go/src/grpcProjects/multiService WORKDIR /go/src/grpcProjects/multiService RUN go get github.com/golang/protobuf/proto RUN go get golang.org/x/net/context RUN go get google.golang.org/grpc RUN go install ./accounting/server ENTRYPOINT [ "/go/bin/server" ] EXPOSE 8080
How to solve this problem?