Skip to content

Commit

Permalink
Configure en_US.UTF-8 locale inside container. Fixes #2600
Browse files Browse the repository at this point in the history
fixes KIWI-TCMS-GX,
https://sentry.io/organizations/kiwitcms/issues/2539019888/

The root cause of the problem was that the default locale was not UTF-8
compatible and Python would error out when handling UTF-8 filenames.

See also https://leimao.github.io/blog/Docker-Locale/
  • Loading branch information
atodorov committed Jan 15, 2022
1 parent 2b875b7 commit 234bd02
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal

RUN microdnf --nodocs install python38 mariadb-connector-c libpq \
httpd python38-mod_wsgi mod_ssl sscg tar && \
httpd python38-mod_wsgi mod_ssl sscg tar glibc-langpack-en && \
microdnf --nodocs update && \
microdnf clean all

Expand All @@ -20,8 +20,11 @@ RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf && \
chmod -R a+rwx /run/httpd
COPY ./etc/kiwi-httpd.conf /etc/httpd/conf.d/

ENV PATH /venv/bin:${PATH} \
VIRTUAL_ENV /venv
ENV PATH=/venv/bin:${PATH} \
VIRTUAL_ENV=/venv \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8

# copy virtualenv dir which has been built inside the kiwitcms/buildroot container
# this helps keep -devel dependencies outside of this image
Expand Down

0 comments on commit 234bd02

Please sign in to comment.