Php on docker : Using setLocale
<p>I'm trying to migrate an existing Apache/php site to docker and have problem with site localization.
Digging into the code, the problem is that setLocale is returning false on Docker install (and true on the existing site).
Here is a php test that runs well on existing site and fails on Docker installation.</p>

<pre><code>&lt;?php
$locale = "fr_FR";
putenv("LC_ALL=$locale");
$ok = setlocale(LC_ALL, $locale);
if ($ok) {
  echo "success";
} else {
  echo "failure";
}
?&gt;
</code></pre>

<p>Here is my Docker file:</p>

<pre><code>FROM php:5-apache

RUN apt-get update &amp;&amp; apt-get install -y locales &amp;&amp; apt-get clean
RUN locale-gen fr_FR &amp;&amp; locale-gen zh_TW &amp;&amp; locale-gen tr_TR &amp;&amp; locale-gen ru_R$
RUN docker-php-ext-install gettext

RUN a2enmod rewrite &amp;&amp; a2enmod headers
</code></pre>

<p>What am I doing wrong?</p>