Reputation: 171
I'm trying to build a Golang project using Docker but the process keeps exiting before it completes, here's a part of the output from the terminal:
github.com/kataras/go-template (download)
Fetching https://golang.org/x/crypto/acme/autocert?go-get=1
Parsing meta tags from https://golang.org/x/crypto/acme/autocert?go-get=1 (status code 200)
get "golang.org/x/crypto/acme/autocert": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/acme/autocert?go-get=1
get "golang.org/x/crypto/acme/autocert": verifying non-authoritative meta tag
The command '/bin/sh -c go get -v' returned a non-zero code: 1
My Dockerfile look like this:
FROM golang:1.7
RUN mkdir -p $GOPATH/src/bitbucket.org/cram/rolldrove
WORKDIR $GOPATH/src/bitbucket.org/cram/rolldrove
COPY . $GOPATH/src/bitbucket.org/cram/rolldrove
RUN go get -v
RUN go build ./server.go
CMD ["./server"]
Help please, how do I fix this it? It was working before but then this started happening.
edit
Re-run with -x flag
github.com/kataras/go-template (download)
cd .
git clone https://github.com/kataras/go-template /go/src/github.com/kataras/go-template
cd /go/src/github.com/kataras/go-template
git submodule update --init --recursive
cd /go/src/github.com/kataras/go-template
git show-ref
cd /go/src/github.com/kataras/go-template
git submodule update --init --recursive
Fetching https://golang.org/x/crypto/acme/autocert?go-get=1
Parsing meta tags from https://golang.org/x/crypto/acme/autocert?go-get=1 (status code 200)
get "golang.org/x/crypto/acme/autocert": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/acme/autocert?go-get=1
get "golang.org/x/crypto/acme/autocert": verifying non-authoritative meta tag
The command '/bin/sh -c go get -v -x' returned a non-zero code: 1
The problem seems to be this line:
get "golang.org/x/crypto/acme/autocert": verifying non-authoritative meta tag
Upvotes: 0
Views: 225
Reputation: 171
The problem was with one of the packages being imported.
I started removing and replacing the 3rd party packages being pulled in one at a time, doing a build after each. It eventually had a successful build after I removed a package from Github that I was using to generate uuid
s. I ended up using the uuid
generator snippet I found here.
Upvotes: 1