buildkite / docker-buildkite-agent

Previous home of buildkite/agent docker image scripts
26 stars 14 forks source link

Support for Ubuntu-based Kubernetes nodes #66

Closed fotinakis closed 6 years ago

fotinakis commented 6 years ago

Have been using the dockerized buildkite-agent just fine with GKE, using cos nodes. The buildkite agent container is mounted with privileged: true and docker-binary and docker-socket mounts so we can run docker-in-docker builds.

I swapped the cos node image for Ubuntu and now get this from inside the buildkite-agent container, when trying to do anything with docker:

bash-4.3# docker
Error relocating /usr/bin/docker: __vfprintf_chk: symbol not found
Error relocating /usr/bin/docker: __fprintf_chk: symbol not found

^ makes sense because buildkite-agent container runs Alpine and is now trying to run an binary built for Ubuntu from the host.

Is there an Ubuntu-based buildkite-agent image we can use instead of Alpine? Or another workaround here?

fotinakis commented 6 years ago

There are also a bunch of other cases where we want to run things in the buildkite-agent container but have to workaround things because it's Alpine — for example, sentry-cli doesn't work without workarounds.

fotinakis commented 6 years ago

Have worked around this for the time being by removing the docker-binary mount (leaving the socket mount) and running apk add docker as a buildkite-agent startup script so that the binary is built for Alpine. I have no idea if there are cases where this will break down but it seems to be working.

Closing for now, but would love to hear if there is a better way to do this or if a :3-ubuntu tag is something you've considered adding.

lox commented 6 years ago

Sorry you ran into that @fotinakis. We'll discuss, but it makes sense to me to offer an ubuntu version as well as the alpine version.

lox commented 6 years ago

I'm going to re-open to remind me :)

lox commented 6 years ago

We've moved the docker packaging code to https://github.com/buildkite/agent/tree/master/packaging/docker/linux, I'm going to close this, but I'd still like an ubuntu flavoured image.

fotinakis commented 6 years ago

Thanks for adding the :ubuntu images, @lox. We recently moved to them entirely because it turned out that something changed with alipine-sdk (which we were installing in our buildkite env) and even installing alpine-sdk in the first place broke any usage of the openssl binary entirely. Migrating to the ubuntu images and just dropping alpine has made things much smoother.