-
Notifications
You must be signed in to change notification settings - Fork 336
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
Alpine ruby image fails Ruby TZ tests due to lack of tzdata #502
Comments
Being a minimal image, it is somewhat unrealistic to document ever instance of an extra package that might be needed. |
The current image description (https://hub.docker.com/_/ruby) includes this admittedly boilerplate blurb about the
We do work hard to make sure this extends to "optional" packages also -- yes, there is core Ruby functionality that doesn't work properly without I do wish it were normal for tools to error out if Another interesting "angle" to this is that Alpine (and musl in general) is not likely a well-supported target for Ruby upstream in general (in many ecosystems, this is referred to as "platform support tiers", and Alpine/musl is usually in the lowest tier if it even makes the list), so more "breakage" than just this is definitely not unexpected when using the Alpine variant, which is why it's not (and likely won't ever be) the default variant. |
I don't believe that this is an "every package" situation. Ruby has a lot (6 million?) of tests. A few more than 100 failed, and >90 are due to the lack of TZData. (I suspect that the rest of my fails were specific to running in a container, either for being root or for expected directories not existing already.) It is very common for things to be shipped with some sort of Errata/Known Issues page. What I'm asking for is that this case be clearly documented. |
sudo docker run --env TZ=America/Los_Angeles -it ruby:slim /usr/local/bin/ruby -e 'puts Time.utc(2007, 11, 4, 9, 0, 0).localtime'
2007-11-04 01:00:00 -0800
sudo docker run --env TZ=America/Los_Angeles -it ruby:alpine /usr/local/bin/ruby -e 'puts Time.utc(2007, 11, 4, 9, 0, 0).localtime'
2007-11-04 09:00:00 +0000
Some searching led to this:
#218
Pointing to this:
https://serverfault.com/questions/683605/docker-container-time-timezone-will-not-reflect-changes/683651#683651
Pointing to this:
gliderlabs/docker-alpine#136
Which looks a LOT like this is a known issue/WONTFIX, but I must protest. This fails the ruby TZ tests.
I understand that as a minimalist distribution, Alpine, tzdata is not required, but it is required for properly-functioning ruby. If the maintainers believe that it is correct to leave tzdata out of the ruby:alpine image, then surely it is friendly to document the absence of the package, probably via a comment next to one of the apk add statements. (I would prefer it in the build set, as it is needed for the tests to pass.)
The text was updated successfully, but these errors were encountered: