diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-23 11:51:44 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-23 11:51:44 +0200 |
| commit | 8dc2e7d2f11aee4e70c3675e4ba6dd255a47e0e4 (patch) | |
| tree | bc1b0fe58a991d26499386f17e3c4c72b69eea1d /Dockerfile | |
| parent | 09a5832797073b5926e533defff1be289d29d351 (diff) | |
| download | bokf-8dc2e7d2f11aee4e70c3675e4ba6dd255a47e0e4.tar.gz bokf-8dc2e7d2f11aee4e70c3675e4ba6dd255a47e0e4.zip | |
web: ship glibc C.utf8 so the web TUI shows åäö
The cross-built bokftui is static glibc; in the Alpine web image it found
no locale data, setlocale() failed and åäö were invalid bytes. The cross
build now copies Debian's C.utf8 into the image and the image build runs
bokfweb --check-locale, so a TUI without UTF-8 fails the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |
