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

Building linux container #2553

Closed
zetab opened this Issue Apr 1, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@zetab
Copy link

zetab commented Apr 1, 2017

I am trying to build custom prometheus version. However, I cannot compile prometheus that it works inside linux container. My laptop is mac.

When I build it manually (using make build) it works normally.

prometheus [release-1.5●] % ./prometheus
INFO[0000] Starting prometheus (version=1.5.2, branch=release-1.5, revision=bd1182d29f462c39544f94cc822830e1c64cf55b)  source=main.go:75
INFO[0000] Build context (go=go1.7.3, user=x@A-C02RK5XDFVH7, date=20170331-11:59:57)  source=main.go:76
INFO[0000] Loading configuration file prometheus.yml     source=main.go:248

if i build docker container (using make docker), the result is this:

prometheus [release-1.5●] % docker run -it prometheus:test
standard_init_linux.go:178: exec user process caused "exec format error"

I tried to find some instructions what I should modify in order to get it working, but without success.

@zetab

This comment has been minimized.

Copy link
Author

zetab commented Apr 1, 2017

I will answer to myself

env GOOS=linux GOARCH=amd64 make build && make docker and after that it works

@zetab zetab closed this Apr 1, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.