Skip to content

Commit

Permalink
feat(docker): Enable data for all provided tools that support system …
Browse files Browse the repository at this point in the history
…locales
  • Loading branch information
alerque committed May 11, 2024
1 parent 0724a85 commit d07d587
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ ARG RUNTIME_DEPS
# Freshen all base system packages
RUN pacman --needed --noconfirm -Syuq && yes | pacman -Sccq

# Enable all supported system locales instead of nearly none so tooling like
# `date` can output localized strings. By default Arch Docker images have
# almost all locale data stripped out.
RUN sed -i -e '/^NoExtract.*locale/d' /etc/pacman.conf
RUN pacman --noconfirm -S glibc && yes | pacman -Sccq
RUN cp /usr/share/i18n/SUPPORTED /etc/locale.gen
RUN locale-gen

# Install run-time dependecies
RUN pacman --needed --noconfirm -Sq $RUNTIME_DEPS && yes | pacman -Sccq

Expand Down Expand Up @@ -61,8 +69,7 @@ ARG VERSION
# Allow `su` with no root password so non-priv users can install dependencies
RUN sed -i -e '/.so$/s/$/ nullok/' /etc/pam.d/su

# Set system locale to something other than 'C' that resolves to a language
RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && locale-gen
# Set system locale to something other than 'C' that resolves to a real language
ENV LANG=en_US.UTF-8

# Make sure the current project volume can be manipulated inside Docker in
Expand Down

0 comments on commit d07d587

Please sign in to comment.