From 158e1590a6f51e1ee778077070b93f5521e8168f Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Tue, 14 Apr 2026 08:35:42 +0200 Subject: [PATCH] Generate all UTF-8 locales, allow locale override via env vars Users can set LANG, LANGUAGE, LC_ALL in .env to override the default en_US.UTF-8 locale (e.g. sv_SE.UTF-8 for Swedish). --- .env.example | 5 +++++ Dockerfile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index eac6c4d..2ee1aba 100644 --- a/.env.example +++ b/.env.example @@ -31,6 +31,11 @@ WORKSPACE_PATH=~/projects # Path to SSH keys on host SSH_KEY_PATH=~/.ssh +# ── Locale (defaults to en_US.UTF-8) ───────────────────────────────── +# LANG=sv_SE.UTF-8 +# LANGUAGE=sv_SE:sv +# LC_ALL=sv_SE.UTF-8 + # ── oh-my-opencode-slim (multi-agent orchestration) ────────────────── # Requires image built with INSTALL_OMOS=true # ENABLE_OMOS=false diff --git a/Dockerfile b/Dockerfile index 730b1f5..7fa4687 100644 --- a/Dockerfile +++ b/Dockerfile @@ -107,8 +107,8 @@ RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64" curl -fsSL "https://static.rust-lang.org/rustup/dist/${ARCH}-unknown-linux-gnu/rustup-init" -o /usr/local/bin/rustup-init && \ chmod +x /usr/local/bin/rustup-init -# Set locale -RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen +# Set locale — generate common UTF-8 locales (override via LANG/LC_ALL env vars) +RUN sed -i '/\.UTF-8/s/^# //g' /etc/locale.gen && locale-gen ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en ENV LC_ALL=en_US.UTF-8