Skip to content

Commit c73797f

Browse files
committed
chore: set default locale to utf-8
Signed-off-by: Vitor Mattos <[email protected]>
1 parent dd70958 commit c73797f

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.docker/Dockerfile.php81

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
1313
gmp \
1414
imagick \
1515
intl \
16+
locales \
1617
memcache \
1718
memcached \
1819
mysqli \
@@ -33,6 +34,13 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
3334
# pevent errors when try to create files at /var/www with user www-data
3435
&& chown -R www-data /var/www
3536

37+
# Set the locale
38+
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
39+
locale-gen
40+
ENV LANG en_US.UTF-8
41+
ENV LANGUAGE en_US:en
42+
ENV LC_ALL en_US.UTF-8
43+
3644
# Run separate to prevent build all extensions
3745
RUN apt-get update \
3846
&& apt-get install -y \

.docker/Dockerfile.php82

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
1313
gmp \
1414
imagick \
1515
intl \
16+
locales \
1617
memcache \
1718
memcached \
1819
mysqli \
@@ -33,6 +34,13 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
3334
# pevent errors when try to create files at /var/www with user www-data
3435
&& chown -R www-data /var/www
3536

37+
# Set the locale
38+
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
39+
locale-gen
40+
ENV LANG en_US.UTF-8
41+
ENV LANGUAGE en_US:en
42+
ENV LC_ALL en_US.UTF-8
43+
3644
# Run separate to prevent build all extensions
3745
RUN apt-get update \
3846
&& apt-get install -y \

.docker/Dockerfile.php83

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
1313
gmp \
1414
imagick \
1515
intl \
16+
locales \
1617
memcache \
1718
memcached \
1819
mysqli \
@@ -33,6 +34,13 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
3334
# pevent errors when try to create files at /var/www with user www-data
3435
&& chown -R www-data /var/www
3536

37+
# Set the locale
38+
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
39+
locale-gen
40+
ENV LANG en_US.UTF-8
41+
ENV LANGUAGE en_US:en
42+
ENV LC_ALL en_US.UTF-8
43+
3644
# Run separate to prevent build all extensions
3745
RUN apt-get update \
3846
&& apt-get install -y \

0 commit comments

Comments
 (0)