Make locale setting OS-dependent

Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
Balasankar "Balu" C 2022-07-05 15:24:53 +05:30
parent 475f5af390
commit a19885da57
No known key found for this signature in database
GPG key ID: B77D2E2E23735427
2 changed files with 11 additions and 1 deletions

View file

@ -100,7 +100,7 @@ ARG HELM_DOWNLOAD_SHA256
RUN if [ -n "$HELM_VERSION" ] ; then /scripts/install-helm $HELM_VERSION $HELM_DOWNLOAD_SHA256; fi
RUN locale-gen C.UTF-8
RUN /scripts/generate-locale
ENV LANG=C.UTF-8 \
LANGUAGE=C \
LC_ALL=C.UTF-8

10
scripts/generate-locale Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -xeou pipefail
BUILD_OS=${BUILD_OS:-debian}
# For UBI, the locale is already present in the image.
if [[ $BUILD_OS =~ debian ]]; then
locale-gen C.UTF-8
fi