← Notes

Set up locale in Docker containers

Set up locale in Docker containers


December 8, 2020

Tags: docker

Add the following to your Dockerfile.

# Set the locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen
ENV LANG en_US.UTF-8  
ENV LANGUAGE en_US:en  
ENV LC_ALL en_US.UTF-8