-
Notifications
You must be signed in to change notification settings - Fork 2k
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
locale_get_display_name does not work as expected by default in Alpine Linux 3.16 based PHP images #1302
Comments
I'd personally lean towards this being the expected behavior of Alpine-based images (as in #1301, which is fundamentally the same underlying cause/issue). From the standard "Alpine" description on https://hub.docker.com/_/php:
(Especially since an additional 29MiB is a pretty non-trivial bump, and it's not going to be all users of the image which require it.) |
How likely is it to come across an app today that doesn't have to deal with internationalization in some way? Maybe this deficit of Alpine images should be emphasized more clearly, or there should be another flavour: alpine-intl and alpine-en? |
Also: this breaks (our) existing apps. If a smaller image is wanted perhaps that can be done at a major release instead of a bugfix release? (and yes adding the package ourselves fixes the problem) |
If you switch from the |
@gdejong thanks for creating this issue! I've just spent 2.5 hours debugging why my dates were suddenly in English instead of the given locale. Fixed after adding |
The problem isn't so much Alpine's philosophy, but the way consumers of the PHP Docker images have to deal with the various package availability changes made between Alpine versions. As a user of this Docker image, let's say of tags From a user standpoint this is quite simply a backwards-incompatible change, or one that contributes to a Docker image tag being unstable. With some more careful consideration of package changes between Alpine versions, such unexpected breakages could be avoided. Much like @Mattie112 mentioned, Alpine version bumps make more sense in tandem with a minor version of PHP, I feel. That said, I'll be adding |
Unfortunately, the Alpine and PHP release cycles aren't in sync (or that would be more tenable), and users constantly want access to the newer Alpine releases, which is why we implemented more specific aliases ( |
Is it planned to add icu-data-full to the alpine 3.16 images? If not, I fear that many developers will spend hours trying to understand why they get issues with dates. |
It appears that Alpine Linux does not come with full localisation support by default. Any reasonable information on this is actually pretty sparse, so it took me more than an hour to fix this. I initially tried to use `musl-locales` and `musl-locales-lang`, however, while these provide partial localisations (for Dutch) PHP would not accept it no matter what. Even moving the files around didn't fix the issue. Finally, I saw docker-library/php#1302 which explained that `icu-data-full` is not installed by default, as it is approximately 30MB (which is quite large for Alpine).
It appears that Alpine Linux does not come with full localisation support by default. Any reasonable information on this is actually pretty sparse, so it took me more than an hour to fix this. I initially tried to use `musl-locales` and `musl-locales-lang`, however, while these provide partial localisations (for Dutch) PHP would not accept it no matter what. Even moving the files around didn't fix the issue. Finally, I saw docker-library/php#1302 which explained that `icu-data-full` is not installed by default, as it is approximately 30MB (which is quite large for Alpine).
your fear was right. |
The latest PHP images based on Alpine Linux now use Alpine Linux v3.16.
In v3.16, Alpine Linux has split the ICU package in two:
icu-data-en
andicu-data-full
.Only the
icu-data-en
package is now installed by default. The Alpine Linux changelog mentions this as well:This results in the following code not working as expected:
This now yields the output
Japanese
instead the expected日本語
. Other locale-related methods will probably also be affected.Would the Alpine-based PHP images want to include the
icu-data-full
package by default? Or is this package expected/intended to be not installed by default?See
The text was updated successfully, but these errors were encountered: