-
Notifications
You must be signed in to change notification settings - Fork 528
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
Confd binary will not run in Alpine, but will run in Ubuntu #78
Comments
it's linked against glibc. musl is not (well, not currently) binary-compatible. you'll want either one built for musl or a statically-linked binary. |
If VDSO is the only external link, it might be possible to static compile the binary. Check out the static cgo section of http://blog.hashbangbash.com/2014/04/linking-golang-statically/. Can you give some info on how confd was compiled? |
Sorry for the false alarm @andyshinn and thanks @muhmuhten I missed the I am tagging @karthequian to answer the question on how it was compiled in case there is a nugget here. |
Hey guys. To compile the binary, I just used the recommended way to build the confd binary from the project (https://github.com/kelseyhightower/confd) on an ubuntu vm. Confd uses the gb build tool. I can try the static build and see if we have the same result. |
Hmm, something must be different in the build process. The 0.10 confd release is a static binary and the ldd output from @behemphi suggests yours is not: $ dria ~/Projects/gliderlabs/docker-alpine
/ # apk-install ca-certificates wget
fetch http://alpine.gliderlabs.com/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
(1/9) Installing run-parts (4.4-r0)
(2/9) Installing openssl (1.0.2d-r0)
(3/9) Installing lua5.2-libs (5.2.4-r0)
(4/9) Installing lua5.2 (5.2.4-r0)
(5/9) Installing ncurses-terminfo-base (5.9-r3)
(6/9) Installing ncurses-widec-libs (5.9-r3)
(7/9) Installing lua5.2-posix (33.3.1-r2)
(8/9) Installing ca-certificates (20141019-r2)
(9/9) Installing wget (1.16.3-r0)
Executing busybox-1.23.2-r0.trigger
Executing ca-certificates-20141019-r2.trigger
OK: 8 MiB in 24 packages
/ # wget -q https://github.com/kelseyhightower/confd/releases/download/v0.10.0/confd-0.10.0-linux-amd64
/ # ldd confd-0.10.0-linux-amd64
ldd: confd-0.10.0-linux-amd64: Not a valid dynamic program |
If someone runs across this, here is what I had to do in the end:
The binary landed in |
Also if you dig around there is a glibc package for Alpine that Andy put On Mon, Oct 5, 2015 at 7:30 PM, Boyd Hemphill notifications@github.com
Jeff Lindsay |
Here is an example of what @progrium is talking about. Thanks guys! https://github.com/stackhub/service-prometheus/blob/master/Dockerfile |
Previously eliotd Docker image what we produced were failing to following error in Linuxkit: standard_init_linux.go:195: exec user process caused "no such file or directory" After testing out the binaries in alpine container, got error: sh: /eliotd: not found Found similar issue here: gliderlabs/docker-alpine#78 Fixed by compiling binaries with CGO_ENABLED=0. Also added container text execution to Circleci to verify that container works.
Previously eliotd Docker image what we produced were failing to following error in Linuxkit: standard_init_linux.go:195: exec user process caused "no such file or directory" After testing out the binaries in alpine container, got error: sh: /eliotd: not found Found similar issue here: gliderlabs/docker-alpine#78 Fixed by compiling binaries with CGO_ENABLED=0. Also added container text execution to Circleci to verify that container works.
We have a dev build of confd running (Sorry I cannot upload it).
In
gliderlabs/alpine
trying to execute it gives only the message "not found" as if the file does not exist. One can clearly see the file exists and is executable however.The exact error looks like this, though I was calling it "foo" at the time:
sh: ./foo: not found
Put the same binary on the host.
confd
responds as expected.Bind mount that binary into a the
alpine
container, and get the same "not found" error.Bind mount that binary into a ubuntu container, and get the expected result (confd tries to start and yelps about missing config).
So finally ran
ldd
. I suspect one of these.so
is missing:Would be happy to send you the binary if you like.
The text was updated successfully, but these errors were encountered: