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
Installing chromium on alpine3.18 gocd docker agent causes crash loop #12440
Comments
If you are trying to install more complex native dependencies (such as browsers) onto your agent images, I'd strongly recommend you choose anything but Alpine. In short, this is because the GoCD agent images currently mix musl libc and glib in ways that are typically a Bad Idea and create problems like this. The saga is more completely summarised at #11355 because it also prevents us producing arm images for Alpine right now. As a result I am contemplating abandoning Alpine images altogether and choosing another "compact" base image which is glibc-based. Anyway, back to your actual problem. It's quite possible that the problem is caused as a result of the chromium install adding Anyway, for the earlier DIND image, the workaround was essentially to forcibly remove udev to workaround this. While that was fine for the usage of Docker within GoCD, I've no idea how Chromium relies on it or what might happen.
I'd suggest you can try and remove it, then see if the GoCD Agent starts. if it does, see if Chromium still works. If this all sounds a bit horrifying, use a non Alpine agent image (Debian, Ubuntu, CentOS), or create your own |
Thanks @chadlwilson - I did run into further problems with software building on the alpine agent even after it started using alpine3.17 so reverted back to using ubuntu already Happy to close this issue unless you think there's further work off the back of it..? |
The maintainer of the library that is loading udev here seems open to adding a software level opt-out which I’ve raised at oshi/oshi#2562 so I’ll keep this open unless that one is rejected. Would be better than my hack of Still can’t guarantee that it’d leave the Alpine image in a fundamentally stable state for running arbitrary apk-installed software as part of builds, but at least would leave the GoCD-agent better protected in the short term. |
Issue Type
Summary
Tried to update our gocd agent to alpine3.18 from 3.16. Noticed that while the image built the agent would not start successfully. Using 3.17 worked ok. Removing pieces from Dockerfile implies chromium package being installed is what causes the issue. We need chromium on the build agent in order to run headless browser tests.
Environment
Basic environment details
Additional Environment Details
Building agent on WSL2/Ubuntu
Steps to Reproduce
docker build -t gocd-example .
docker run -e GO_SERVER_URL=https://go-server-url gocd-example
Expected Results
Agent should start successfully
Actual Results
JRE encounters fatal exception, waits 10 seconds then retries with same result, on a loop
Possible Fix
Log snippets
output of installing chromium:
Any other info
error looks similar to #11561
The text was updated successfully, but these errors were encountered: