Coder Social home page Coder Social logo

[8.x] Missing Locales about docker HOT 9 CLOSED

craftcms avatar craftcms commented on May 23, 2024
[8.x] Missing Locales

from docker.

Comments (9)

thijskaspers avatar thijskaspers commented on May 23, 2024 4

This could have to do with the Alpine Linux version that the latest PHP Docker images utilize. Since Alpine Linux 3.16, the ICU locales packages have been divided: icu-data-en and icu-data-full. Somehow Alpine decided only the first package has to be installed by default.

So possible fixes: downgrade/pin to Alpine Linux 3.15 (image php:${PHP_VERSION}-${PROJECT_TYPE}-alpine3.15) or install necessary packages: apk add icu-data-full to install all locales.

from docker.

thijskaspers avatar thijskaspers commented on May 23, 2024 2

See: #59 (comment)

@timkelty this issue is preventing people from using Craft with Nitro in their desired locale. If the user doesn't have the Craft docker image pulled to their system yet, it will pull the latest version, which is based on the official PHP image with Alpine 3.16. The icu-data-full package has become optional since Alpine 3.16 and isn't installed in the Craft docker image, so only English is an option when installing Craft.

Would it be best to add that package, or to pin Alpine to a fixed version (in this case 3.15, which doesn't have the issue yet)? Or both? Perhaps pin to 3.16 and install the icu-data-full dependency to be sure nothing goes wrong when people rebuild the image?

(I'm unsure if the icu-data-full package is also available for v3.15, so this might throw errors when the system tries to build the image while the build layer is still using 3.15 as the base image instead of 3.16)

from docker.

Mankeldor avatar Mankeldor commented on May 23, 2024 1

Yes, you are able to login as su with this command:

docker exec -it --user root YOUR_CONTAINER_NAME sh

then with apk add icu-data-full followed by a restart of the container gives me all languages back. :-)

from docker.

thijskaspers avatar thijskaspers commented on May 23, 2024

Alpine Linux 3.16 changelog states:

"icu-libs only installs icu-data-en. If additional language support is required, icu-data-full needs to be installed manually."

from docker.

thijskaspers avatar thijskaspers commented on May 23, 2024

(I'm unsure if the icu-data-full package is also available for v3.15, so this might throw errors when the system tries to build the image while the build layer is still using 3.15 as the base image instead of 3.16)

Update to confirm icu-data-full isn't available on Alpine Linux 3.15. It has been separated from the ICU data package since 3.16, mentioned here: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.16.0

from docker.

therealpecus avatar therealpecus commented on May 23, 2024

install necessary packages: apk add icu-data-full to install all locales.

@thijskaspers @timkelty are there any workarounds available ATM? www-data does not have permissions to run apk add but su(do) is not available

from docker.

timkelty avatar timkelty commented on May 23, 2024

New images have been pushed to dockerhub – could you try again?

from docker.

Mankeldor avatar Mankeldor commented on May 23, 2024

In my case this issue is now fixed. :-)

My steps:

  1. Destroy nginx containers
  2. brew upgrade
  3. nitro update

from docker.

timkelty avatar timkelty commented on May 23, 2024

Thanks for everyone's help and patience!

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.