When I follow an exact sequence of steps of cloning and building my project outside of docker it works well. When I place the exact same sequence into a docker file I am seeing the following error.
I don't know enough about docker to know how to formulate this question more succinctly, except to say, does anyone know how to resolve this type of error.
Step 18/22 : RUN go build
---> Running in 27e0719b2e7d
go: gitlab.com/myorg/[email protected]: reading gitlab.com/myorg/lalo/go.mod at revision v0.12.3: unknown revision v0.12.3
To be clear, I am able to create a new empty temporary folder on my computer (without docker and do a full clean build), it is only when I do the same in docker that I see this unknown revision issue.
Add the following to the docker config.
RUN git config --global url."[email protected]:".insteadOf "https://gitlab.com/"
(That rather obscure error obfuscates the fact that it go get
is having some more basic problems.)
You are most likely missing something in your environment that is set up for you upon login. Go builds are affected by environment variables like GOPATH
and GOROOT
. Your gitlab repo might require ssh keys for access. It's something you would have had to set up at some point. Look in your .bashrc
and .profile
files, and the output of the env
command for hints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With