From c6096e21a120b5de47582abdd74b513484f83889 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 3 Oct 2023 21:39:15 -0700 Subject: [PATCH] Set CI image locale to en_US.UTF-8 Closes gh-37673 --- ci/images/ci-image-jdk21/Dockerfile | 3 +++ ci/images/ci-image/Dockerfile | 3 +++ ci/images/setup.sh | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/images/ci-image-jdk21/Dockerfile b/ci/images/ci-image-jdk21/Dockerfile index 4a75711210..d8ed447fcc 100644 --- a/ci/images/ci-image-jdk21/Dockerfile +++ b/ci/images/ci-image-jdk21/Dockerfile @@ -6,6 +6,9 @@ ADD get-docker-url.sh /get-docker-url.sh ADD get-docker-compose-url.sh /get-docker-compose-url.sh RUN ./setup.sh java17 java21 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 ENV JAVA_HOME /opt/openjdk ENV PATH $JAVA_HOME/bin:$PATH ADD docker-lib.sh /docker-lib.sh diff --git a/ci/images/ci-image/Dockerfile b/ci/images/ci-image/Dockerfile index d4d2ce1b08..37a572f7e6 100644 --- a/ci/images/ci-image/Dockerfile +++ b/ci/images/ci-image/Dockerfile @@ -6,6 +6,9 @@ ADD get-docker-url.sh /get-docker-url.sh ADD get-docker-compose-url.sh /get-docker-compose-url.sh RUN ./setup.sh java17 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 ENV JAVA_HOME /opt/openjdk ENV PATH $JAVA_HOME/bin:$PATH ADD docker-lib.sh /docker-lib.sh diff --git a/ci/images/setup.sh b/ci/images/setup.sh index 48df23b707..dfde3d20dd 100755 --- a/ci/images/setup.sh +++ b/ci/images/setup.sh @@ -2,12 +2,13 @@ set -ex ########################################################### -# UTILS +# OS and UTILS ########################################################### export DEBIAN_FRONTEND=noninteractive apt-get update -apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq +apt-get install --no-install-recommends -y locales tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq +locale-gen en_US.utf8 ln -fs /usr/share/zoneinfo/UTC /etc/localtime dpkg-reconfigure --frontend noninteractive tzdata rm -rf /var/lib/apt/lists/*