Skip to content

Commit 57b1a6f

Browse files
committed
Add default locales and generate them for correct usage of setlocale in PHP applications
1 parent 688c8a9 commit 57b1a6f

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

5.4/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,26 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
5656

5757
RUN echo Europe/Brussels > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
5858

59+
RUN echo 'de_DE ISO-8859-1\n\
60+
de_DE.UTF-8 UTF-8\n\
61+
de_DE@euro ISO-8859-15\n\
62+
en_GB ISO-8859-1\n\
63+
en_GB.ISO-8859-15 ISO-8859-15\n\
64+
en_US ISO-8859-1\n\
65+
en_US.ISO-8859-15 ISO-8859-15\n\
66+
en_US.UTF-8 UTF-8\n\
67+
fr_FR ISO-8859-1\n\
68+
fr_FR.UTF-8 UTF-8\n\
69+
fr_FR@euro ISO-8859-15\n\
70+
nl_BE ISO-8859-1\n\
71+
nl_BE.UTF-8 UTF-8\n\
72+
nl_BE@euro ISO-8859-15\n\
73+
nl_NL ISO-8859-1\n\
74+
nl_NL.UTF-8 UTF-8\n\
75+
nl_NL@euro ISO-8859-15\n'\
76+
>> /etc/locale.gen && \
77+
usr/sbin/locale-gen
78+
5979
RUN ln -sf /dev/stderr /var/log/apache2/error.log
6080

6181
COPY dummy.crt /etc/ssl/crt/dummy.crt

5.6/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,26 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
6363

6464
RUN echo Europe/Brussels > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
6565

66+
RUN echo 'de_DE ISO-8859-1\n\
67+
de_DE.UTF-8 UTF-8\n\
68+
de_DE@euro ISO-8859-15\n\
69+
en_GB ISO-8859-1\n\
70+
en_GB.ISO-8859-15 ISO-8859-15\n\
71+
en_US ISO-8859-1\n\
72+
en_US.ISO-8859-15 ISO-8859-15\n\
73+
en_US.UTF-8 UTF-8\n\
74+
fr_FR ISO-8859-1\n\
75+
fr_FR.UTF-8 UTF-8\n\
76+
fr_FR@euro ISO-8859-15\n\
77+
nl_BE ISO-8859-1\n\
78+
nl_BE.UTF-8 UTF-8\n\
79+
nl_BE@euro ISO-8859-15\n\
80+
nl_NL ISO-8859-1\n\
81+
nl_NL.UTF-8 UTF-8\n\
82+
nl_NL@euro ISO-8859-15\n'\
83+
>> /etc/locale.gen && \
84+
usr/sbin/locale-gen
85+
6686
RUN ln -sf /dev/stderr /var/log/apache2/error.log
6787

6888
COPY dummy.crt /etc/ssl/crt/dummy.crt

0 commit comments

Comments
 (0)