-
Notifications
You must be signed in to change notification settings - Fork 76
Skylight Platform Util does not always detect Alpine Linux/musl #92
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
Comments
Huh, that's quite odd and seems like a bug in Ruby. However, unless we want to wait for a fix there I guess we'll have to work around it. |
@ryansch have you verified that it works if we use the musl version instead? |
@wagenet I'll fork and do that now. |
@ryansch thanks! |
FWIW, it seems very odd to me that they're building Ruby against libc when it will be used on a platform without it. I'm not sure how this isn't causing lots of problems elsewhere! |
@wagenet Ruby is being built against musl here but the value of |
@ryansch hmm... I could have sworn I got this to work when Linux was the host! Definitely something weird going on, but Docker isn't my strong suit :/ |
@wagenet I can confirm that rails does start now with the musl version of libskylight installed. |
@ryansch thanks for checking this! I'll try to get a proper fix in place soon. |
@wagenet Do you need a small container to test with? |
Looks like |
@wagenet Doesn't look reliable here. Edit: I don't see the string 'musl' anywhere inside of |
@wagenet Have a look at the output of |
Ah, I was building Ruby as part of the |
Exactly. Comparing the Dockerfile vs the APKBUILD didn't show anything obvious. |
I'm thinking of doing this:
|
I don't love it, but I'm not sure of a better way to handle this. |
@wagenet I think that's the best solution right now. |
Should be fixed in 138bb9a |
@ryansch thanks again for your help here! |
@wagenet And thanks for yours! |
RbConfig::CONFIG['host_os']
seems to reflect the host OS in use when ruby was compiled. If an alpine linux container is being built on an alpine host then we getlinux-musl
but if an alpine linux container is being built on a libc host then we get eitherlinux
orlinux-gnu
.This means that the official
ruby:2.3.3-alpine
container will reportlinux-gnu
back and install the wrong version of libskylight. Here's a copy of my install.log from inside of aruby:2.3.3-alpine
container:This appears to be the root cause behind #59 and #91.
A more reliable way to detect alpine might be to inspect the contents of
/etc/os-release
or/etc/alpine-release
.The text was updated successfully, but these errors were encountered: