From 188c7aa369ac72d0b6d4eb698d34ed57f7d7985c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=96=8E=F0=9D=96=9A=F0=9D=96=91=F0=9D=96=8E?= =?UTF-8?q?=F0=9D=96=8E=F0=9D=96=86?= Date: Sat, 5 Sep 2026 01:47:26 +0300 Subject: [PATCH] fix(docker): apply patch-package in the builder stage and set a UTF-8 locale (#3346) * fix(docker): apply patch-package in the builder stage The deps stage installs with --ignore-scripts, so the root postinstall never runs and patches/ghostty-web+0.4.0.patch is never applied. The web bundle in the Docker image therefore shipped an unpatched ghostty-web renderer. Run patch-package explicitly in the builder stage, after the full source copy, before building the web assets. Co-Authored-By: Claude Fable 5.1 * fix(docker): set a UTF-8 locale in the runtime image The oven/bun base image ships with the POSIX locale, so bash readline in the built-in terminal treated each byte of a multibyte character separately and garbled the echo of pasted Unicode input. Co-Authored-By: Claude Fable 5.1 --------- Co-authored-by: Claude Fable 5.1 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8a5bb0c9..01cb2f28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,10 @@ RUN bun install --frozen-lockfile --ignore-scripts FROM deps AS builder WORKDIR /app COPY . . +# `deps` installs with --ignore-scripts, so the root postinstall never runs there +# and the patches/ directory is not present yet. Apply patch-package here, after +# the full source copy, so the web bundle ships the patched ghostty-web. +RUN bunx patch-package RUN bun run build:web FROM oven/bun:1.3.14 AS runtime @@ -53,6 +57,9 @@ RUN npm config set prefix /home/openchamber/.npm-global && mkdir -p /home/opench COPY --from=cloudflare/cloudflared@sha256:6d91c121b803126f7a5344005d17a9324788fc09d305b6e2560ec6040a7ae283 /usr/local/bin/cloudflared /usr/local/bin/cloudflared ENV NODE_ENV=production +# The base image ships with the POSIX locale, which makes bash readline treat +# every byte of a multibyte character separately in the built-in terminal. +ENV LANG=C.UTF-8 COPY scripts/docker-entrypoint.sh /home/openchamber/openchamber-entrypoint.sh