Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCannot build Docker image #2457
Comments
This comment has been minimized.
This comment has been minimized.
|
How did you build the |
This comment has been minimized.
This comment has been minimized.
|
I did Both give the same issue :/ |
This comment has been minimized.
This comment has been minimized.
|
My hunch was right, when I compile it statically, it works!
now prometheus starts up in docker! |
This comment has been minimized.
This comment has been minimized.
|
Yes I've observed this as well, unfortunately the go compiler behaves differently when on OSX or linux. On OSX because there is no glibc to link to it compiles a binary that does not link to it, even when not explicitly disabling cgo. Then when you compile the same thing on linux there is a glibc available and so it links to it, and when you then put that binary in a container it doesn't work anymore. |
This comment has been minimized.
This comment has been minimized.
|
Yes, I think we should be building static binaries only. But I think this is an issue with |
This comment has been minimized.
This comment has been minimized.
|
Yes I agree, it's quite confusing as the binaries are actually built statically when releasing (using |
brian-brazil
closed this
Mar 27, 2017
This comment has been minimized.
This comment has been minimized.
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. |
gouthamve commentedMar 1, 2017
What did you do?
make dockeronmasterand then tried to run the image.What did you expect to see?
Prometheus runs!
What did you see instead? Under which circumstances?
standard_init_linux.go:178: exec user process caused "no such file or directory"Environment
Linux 4.9.8-1-ARCH x86_64
I think this is because of dynamic linking, but I would have expected
make dockerto run out of the box!