From c9abf282b5a3f60dee89e51376713ec220b9be47 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Thu, 20 Aug 2015 01:44:30 -0700 Subject: [PATCH] Set docker locale to utf-8 Shocked, shocked, that there's a Linux distribution out that there isn't doing the right thing and setting up utf-8 by default. (Many tests failed) --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4a57d7ab..35f3c3e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN useradd docker \ # Update system and install our dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ + locales \ ghostscript \ tesseract-ocr \ tesseract-ocr-deu tesseract-ocr-spa tesseract-ocr-eng tesseract-ocr-fra \ @@ -23,6 +24,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3-reportlab \ python3-pil +# Enforce UTF-8 +# Borrowed from https://index.docker.io/u/crosbymichael/python/ +RUN dpkg-reconfigure locales && \ + locale-gen C.UTF-8 && \ + /usr/sbin/update-locale LANG=C.UTF-8 +ENV LC_ALL C.UTF-8 + # Set up a Python virtualenv and take all of the system packages, so we can # rely on the platform packages rather than importing GCC and compiling them RUN pyvenv /appenv \