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

Fix go build so the binary runs in alpine container #1

Merged
merged 1 commit into from May 28, 2020
Merged

Fix go build so the binary runs in alpine container #1

merged 1 commit into from May 28, 2020

Conversation

max-rocket-internet
Copy link
Contributor

Currently the docker image does not function at all:

$ docker run drone/drone-admit-members
standard_init_linux.go:211: exec user process caused "no such file or directory"

This is because the binary inside is not compiled for alpine:

$ docker run --entrypoint="/bin/sh" -it drone/drone-admit-members
/ # ls /bin/drone-admit-members
/bin/drone-admit-members
/ # /bin/drone-admit-members
/bin/sh: /bin/drone-admit-members: not found
/ # ldd /bin/drone-admit-members
	/lib64/ld-linux-x86-64.so.2 (0x7f373dffe000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f373dffe000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f373dffe000)

So here I am:

  • Adding required env vars to build a binary to run in the alpine docker image
  • Fixing build step to use golang:1.12 since this version is in go.mod

@bradrydzewski
Copy link
Member

good catch, thanks!

@bradrydzewski bradrydzewski merged commit fa49e7a into drone:master May 28, 2020
1 check passed
@max-rocket-internet max-rocket-internet deleted the fix_docker branch May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants