I found similar issues here in stackoverflow but I sipmly find no solution. Please help.
My go env:
set GO111MODULE=on
set GOPATH=C:\Users\[username]\go
set GOROOT=C:\Go
And when building go project with docker build -t gotest:vlocal . I get main.go:7:2: package models is not in GOROOT (/usr/local/go/src/models)
but C:\Go\src\models folder exists and go build main.go creates the exe in C:\Go\bin, go run main.go runs the program.
My docker file
FROM golang:1.14.3-alpine AS build
WORKDIR /src
COPY . .
RUN go build -o /out/example .
FROM scratch AS bin
COPY --from=build /out/example /