Skip to content

Commit

Permalink
Generate locales at Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-lerch committed May 19, 2020
1 parent 357f1bc commit 8675eb2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM php:5.6-apache

RUN set -x \
# Install necessary packages
&& apt-get update \
&& apt-get install -y zip unzip less vim cron libc-client-dev libkrb5-dev libpng-dev libjpeg-dev \
# Install some useful utilities
&& apt-get install -y zip unzip less vim \
# Install runtime dependencies
cron locales \
# Install PHP extension dependencies
libc-client-dev libkrb5-dev libpng-dev libjpeg-dev \
&& rm -rf /var/lib/apt/list/* \
# Install PHP extensions
&& docker-php-ext-configure mysql \
Expand All @@ -14,6 +18,15 @@ RUN set -x \
&& docker-php-ext-install gd \
# Configure environment
&& a2enmod rewrite \
&& sed -i \
-e 's/# de_CH ISO-8859-1/de_CH ISO-8859-1/' \
-e 's/# de_DE ISO-8859-1/de_DE ISO-8859-1/' \
-e 's/# en_GB ISO-8859-1/en_GB ISO-8859-1/' \
-e 's/# en_US ISO-8859-1/en_US ISO-8859-1/' \
-e 's/# fr_CH ISO-8859-1/fr_CH ISO-8859-1/' \
-e 's/# nl_NL ISO-8859-1/nl_NL ISO-8859-1/' \
/etc/locale.gen \
&& locale-gen \
# Remove temporary packages
&& apt-get purge -y --autoremove libc-client-dev libkrb5-dev
# libpng-dev and libjpeg-dev contain shared files and must not be removed
Expand Down

0 comments on commit 8675eb2

Please sign in to comment.