summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index a46e15e..5102a42 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,7 +23,9 @@ RUN if [ -x .prebuilt/bokfd ]; then \
VERSION="$VERSION" \
&& make test-core VERSION="$VERSION"; \
fi \
- && strip build/bokfd build/bokfctl build/bokftui build/bokfweb
+ && strip build/bokfd build/bokfctl build/bokftui build/bokfweb \
+ && mkdir -p build/locale \
+ && if [ -d .prebuilt/locale ]; then cp -a .prebuilt/locale/. build/locale/; fi
# The web frontend (image bokf-web, `--target web`): Caddy for routing, the
# bokfweb login gate, ttyd and bokftui in web mode. It reaches bokfd only
@@ -36,9 +38,13 @@ RUN apk add --no-cache ca-certificates caddy ttyd ncurses-terminfo-base \
&& addgroup -S bokfd \
&& adduser -S -D -H -u 10001 -G bokfd -s /sbin/nologin bokfd
COPY --from=build /src/build/bokftui /src/build/bokfweb /usr/local/bin/
+# glibc locale data for the cross-built static binaries (empty for a native
+# musl build, which needs none); the check fails the build without UTF-8
+COPY --from=build /src/build/locale/ /usr/lib/locale/
COPY deploy/bokftui-web deploy/web-entrypoint.sh /usr/local/bin/
COPY deploy/Caddyfile /etc/caddy/Caddyfile
-RUN chmod 0755 /usr/local/bin/bokftui-web /usr/local/bin/web-entrypoint.sh
+RUN chmod 0755 /usr/local/bin/bokftui-web /usr/local/bin/web-entrypoint.sh \
+ && LANG=C.UTF-8 bokfweb --check-locale
ENV BOKFD_SOCKET=/run/bokfd/bokfd.sock \
TERM=xterm-256color \
LANG=C.UTF-8