Skip to content
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

Fix missing localisation options in clean installs #61

Closed
wants to merge 2 commits into from
Closed

Fix missing localisation options in clean installs #61

wants to merge 2 commits into from

Conversation

SHoogland
Copy link

@SHoogland SHoogland commented Jun 15, 2022

Description

Should fix the missing localisation issues according to #59 (comment)

Related issues

#59
#60

@thijskaspers
Copy link

Thanks for creating the PR @SHoogland !

We might have to force the PHP image to Alpine 3.16 or newer as well, as the icu-data-full package is only available from 3.16 and up. See https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.16.0. If people build the image while their Alpine Linux version still has 3.15 in the build cache, it might fail with a message that the icu-data-full package can't be found.

@timkelty what's your take on this? Also see this issue in the PHP docker image repo for more information on the subject: docker-library/php#1302 (comment)

Copy link

@thijskaspers thijskaspers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iconv-build is a separate Docker "multi-stage" build layer. That is not the PHP image that is used for the build. The line that needs to be changed to pin PHP to a newer Alpine Linux version is line 8, where it says:

FROM php:${PHP_VERSION}-${PROJECT_TYPE}-alpine

That one has to be changed to:

FROM php:${PHP_VERSION}-${PROJECT_TYPE}-alpine3.16

This will pin it to Alpine 3.16 where icu-data-full is available as a package. Also see https://hub.docker.com/_/php?tab=tags&page=1&name=alpine for the available Alpine tags in the official PHP docker images repo.

@thijskaspers
Copy link

thijskaspers commented Jun 15, 2022

By the way, this issue is present in all PHP versions, so it will also have to be updated at Dockerfile 7.3, 7.4 and 8.0 😅

Edit: for PHP 7.3 the newest Alpine Build is 3.15 (3.16 doesn't exist), so that one has to be pinned to 3.15 without the need for the icu-data-full package. See: https://hub.docker.com/_/php?tab=tags&page=1&name=7.3-fpm-alpine

7.4 and 8.0 can be pinned to 3.16 with the icu-data-full package

@timkelty
Copy link
Collaborator

Looking into this today, stay tuned!

@brnquester
Copy link

As a temporary solution, I have built the craftcms/php-fpm:8.0 container with the following customization:

RUN apk update \
        && apk add icu-dev icu-data-full \
        && docker-php-ext-configure intl \
        && docker-php-ext-install intl \
        && apk add --no-cache $PHPIZE_DEPS 

Worked fine.

@timkelty
Copy link
Collaborator

Edit: for PHP 7.3 the newest Alpine Build is 3.15 (3.16 doesn't exist), so that one has to be pinned to 3.15 without the need for the icu-data-full package. See: https://hub.docker.com/_/php?tab=tags&page=1&name=7.3-fpm-alpine

Actually, I just removed 7.3 from builds going forward. We try to match what https://github.com/docker-library/php is doing in that regard, and they are only building 7.4 and up currently.

@timkelty
Copy link
Collaborator

Fixed this, but not with this commit. Nonetheless, thanks @SHoogland.

@timkelty timkelty closed this Jun 17, 2022
@SHoogland SHoogland deleted the patch-1 branch June 17, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants