diff --git a/lib/functions/host/docker.sh b/lib/functions/host/docker.sh index 9def3d16f8..6b1e394a4a 100644 --- a/lib/functions/host/docker.sh +++ b/lib/functions/host/docker.sh @@ -292,10 +292,9 @@ function docker_cli_prepare_dockerfile() { ${c}RUN echo "--> CACHE MISS IN DOCKERFILE: apt packages." && \\ ${c} DEBIAN_FRONTEND=noninteractive apt-get -y update && \\ ${c} DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${BASIC_DEPS[@]} ${host_dependencies[@]} - ${c}RUN sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen - ${c}RUN locale-gen + ${c}# Use C.UTF-8 locale which is available in rootfs from the very first command WORKDIR ${DOCKER_ARMBIAN_TARGET_PATH} - ENV ARMBIAN_RUNNING_IN_CONTAINER=yes + ENV ARMBIAN_RUNNING_IN_CONTAINER=yes LANG=C.UTF-8 ADD . ${DOCKER_ARMBIAN_TARGET_PATH}/ ${c}${c_req}RUN echo "--> CACHE MISS IN DOCKERFILE: running Armbian requirements initialization." && \\ ${c}${c_req} ARMBIAN_INSIDE_DOCKERFILE_BUILD="yes" /bin/bash "${DOCKER_ARMBIAN_TARGET_PATH}/compile.sh" requirements SHOW_LOG=yes && \\ diff --git a/lib/functions/host/prepare-host.sh b/lib/functions/host/prepare-host.sh index 916c1be0d8..55bbada64e 100644 --- a/lib/functions/host/prepare-host.sh +++ b/lib/functions/host/prepare-host.sh @@ -57,11 +57,8 @@ function prepare_host_noninteractive() { display_alert "locale-gen is not installed @host" "skipping locale-gen -- problems might arise" "warn" fi - # Let's try and get all log output in English, overriding the builder's chosen or default language - export LANG="en_US.UTF-8" - export LANGUAGE="en_US.UTF-8" - export LC_ALL="en_US.UTF-8" - export LC_MESSAGES="en_US.UTF-8" + # Use C.UTF-8 locale which is always available in rootfs from the very first command + export LANG="C.UTF-8" declare -g USE_LOCAL_APT_DEB_CACHE=${USE_LOCAL_APT_DEB_CACHE:-yes} # Use SRC/cache/aptcache as local apt cache by default display_alert "Using local apt cache?" "USE_LOCAL_APT_DEB_CACHE: ${USE_LOCAL_APT_DEB_CACHE}" "debug"