@@ -7,22 +7,11 @@ FROM docker.io/library/archlinux:base-devel$ARCHTAG AS builder
77ARG RUNTIME_DEPS
88ARG BUILD_DEPS
99
10- # Enable system locales for everything we have localizations for so tools like
11- # `date` will output matching localized strings. By default Arch Docker images
12- # have almost all locale data stripped out. This also makes it easier to
13- # rebuild custom Docker images with extra languages supported.
14- RUN sed -i -e '/^NoExtract.*locale/d' /etc/pacman.conf
15-
1610# Freshen all base system packages
1711RUN pacman-key --init
1812RUN pacman --needed --noconfirm -Syq archlinux-keyring
1913RUN pacman --needed --noconfirm -Suq
2014
21- # Make sure *at least* glibc actually got reinstalled after enabling
22- # extraaction of locale files even if the version was fresh so we can use the
23- # locale support out of it later.
24- RUN pacman --noconfirm -Sq glibc && yes | pacman -Sccq
25-
2615# Install run-time dependencies
2716RUN pacman --needed --noconfirm -Sq $RUNTIME_DEPS $BUILD_DEPS
2817
@@ -32,10 +21,6 @@ ARG REVISION
3221COPY ./ /src
3322WORKDIR /src
3423
35- # Rebuild locale database after having added our supported locales.
36- RUN ls i18n/ | sed 's/[.-].*$/_/;s/^/^/' | sort -u | grep -Ef - /usr/share/i18n/SUPPORTED > /etc/locale.gen
37- RUN locale-gen
38-
3924# GitHub Actions builder stopped providing git history :(
4025# See feature request at https://github.com/actions/runner/issues/767
4126RUN build-aux/docker-bootstrap.sh
@@ -58,6 +43,12 @@ ARG REVISION
5843# Allow `su` with no root password so non-priv users can install dependencies
5944RUN sed -i -e '/.so$/s/$/ nullok/' /etc/pam.d/su
6045
46+ # Enable system locales for everything we have localizations for so tools like
47+ # `date` will output matching localized strings. By default Arch Docker images
48+ # have almost all locale data stripped out. This also makes it easier to
49+ # rebuild custom Docker images with extra languages supported.
50+ RUN sed -i -e '/^NoExtract.*locale/d' /etc/pacman.conf
51+
6152# Set system locale to something other than 'C' that resolves to a real language
6253ENV LANG=en_US.UTF-8
6354
@@ -66,6 +57,11 @@ RUN pacman-key --init
6657RUN pacman --needed --noconfirm -Syq archlinux-keyring && yes | pacman -Sccq
6758RUN pacman --needed --noconfirm -Suq && yes | pacman -Sccq
6859
60+ # Make sure *at least* glibc actually got reinstalled after enabling
61+ # extraction of locale files even if the version was fresh so we can use the
62+ # locale support out of it later.
63+ RUN pacman --noconfirm -Sq glibc && yes | pacman -Sccq
64+
6965# Install run-time dependencies
7066RUN pacman --needed --noconfirm -Sq $RUNTIME_DEPS && yes | pacman -Sccq
7167
@@ -82,6 +78,11 @@ COPY build-aux/docker-fontconfig.conf /etc/fonts/conf.d/99-docker.conf
8278
8379COPY --from=builder /pkgdir /
8480COPY --from=builder /src/src/sile-entry.sh /usr/local/bin
81+
82+ # Rebuild locale database after having added our supported locales.
83+ RUN ls /usr/local/share/sile/i18n/ | sed 's/[.-].*$/_/;s/^/^/' | sort -u | grep -Ef - /usr/share/i18n/SUPPORTED > /etc/locale.gen
84+ RUN locale-gen
85+
8586RUN sile --version
8687
8788WORKDIR /data
0 commit comments