Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while building docker image #30

Open
burghategaurao opened this issue Jan 9, 2019 · 7 comments
Open

Issue while building docker image #30

burghategaurao opened this issue Jan 9, 2019 · 7 comments

Comments

@burghategaurao
Copy link

Facing issue while building docker image.
package github.com/BonnierNews/logstash_exporter: directory "/go/src/github.com/BonnierNews/logstash_exporter" is not using a known version control system
T

Below are trace while building image.
Sending build context to Docker daemon 12.45MB
Step 1/8 : FROM golang:1.9 as golang
---> ef89ef5c42a9
Step 2/8 : ADD . $GOPATH/src/github.com/BonnierNews/logstash_exporter/
---> 97ace632cfe1
Step 3/8 : RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 && chmod +x /usr/local/bin/dep && go get -u github.com/BonnierNews/logstash_exporter && cd $GOPATH/src/github.com/BonnierNews/logstash_exporter && dep ensure && make
---> Running in 9b8597dd1c79
package github.com/BonnierNews/logstash_exporter: directory "/go/src/github.com/BonnierNews/logstash_exporter" is not using a known version control system
The command '/bin/sh -c curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 && chmod +x /usr/local/bin/dep && go get -u github.com/BonnierNews/logstash_exporter && cd $GOPATH/src/github.com/BonnierNews/logstash_exporter && dep ensure && make' returned a non-zero code: 1

@burghategaurao
Copy link
Author

@davidkarlsen Could you please have look into this.

@davidkarlsen
Copy link
Contributor

Hmm, it fails for me at:

Warning: Permanently added the RSA host key for IP address '140.82.118.4' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
package github.com/BonnierNews/logstash_exporter: exit status 1

Looks like docker-library/golang#148
But I tried doing ssh-keyscan - yet it fails

@davidkarlsen
Copy link
Contributor

davidkarlsen commented Jan 21, 2019

Found it - there are tree PRs.
One for the build, and one more for general upgrades of tooling etc, a third for packages

@fshabir
Copy link

fshabir commented Feb 4, 2019

Has anyone been able to build the latest source using Docker file provided in the repo? I am stuck at this:

/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
/tmp/gopackages288076290/net/cgo_unix.cgo1.go:1::warning: no such file or directory (compile) (staticcheck)
Makefile:22: recipe for target 'gometalinter' failed
make: *** [gometalinter] Error 1
The command '/bin/sh -c curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 &&         chmod +x /usr/local/bin/dep &&         go get -u github.com/BonnierNews/logstash_exporter &&         cd $GOPATH/src/github.com/BonnierNews/logstash_exporter &&         dep ensure &&         make' returned a non-zero code: 2

@davidkarlsen
Copy link
Contributor

@fshabir works with #31 ?

@burghategaurao
Copy link
Author

I have tested docker file from https://github.com/davidkarlsen/logstash_exporter repository.It looks good. Able to build docker image.
Could you please merge this in master for https://github.com/BonnierNews/logstash_exporter?

@fshabir
Copy link

fshabir commented Feb 6, 2019

@davidkarlsen it worked after I change the golang version inside Dockerfile from 1.9 to 1.11 by looking at the comments on #31 :)
Thanks for the pointer !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants