title: Setting locale inside docker container
body: <p>My container has locale settep up to POSIX and I want to change it. After I do that, I exit and reenter the container and the locale is back to POSIX.
  I don't want to build a new image or run a new container because we have a lot of containers in several machines.</p>
  
  <p>Running this:</p>
  
  <pre><code>DEBIAN_FRONTEND=noninteractive apt-get install -y locales
  sed -i -e 's/# pt_PT ISO-8859-1/pt_PT ISO-8859-1/' /etc/locale.gen
  dpkg-reconfigure --frontend=noninteractive locales
  export LANGUAGE=pt_PT
  export LANG=pt_PT
  export LC_ALL=pt_PT
  </code></pre>
  
  <p>Works great in running container but exiting and reentering the container makes the changes lost.</p>
  
  <p>Already tried this code in container Entrypoint but the export doesn't have any effect.</p>