From 8bd9fd997e7b3ce5a6b5f69bcc66ed98bca64d14 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Mon, 13 Dec 2021 10:31:08 +0000 Subject: [PATCH] Use C.UTF-8 --- Dockerfile.custom | 8 ++++---- Dockerfile.omnibus-gitlab-bionic | 8 +++----- Dockerfile.omnibus-gitlab-buster | 10 +++++----- Dockerfile.omnibus-gitlab-centos7 | 2 ++ Dockerfile.omnibus-gitlab-centos8 | 6 +++--- Dockerfile.omnibus-gitlab-focal | 8 +++----- Dockerfile.omnibus-gitlab-jessie | 10 +++++----- Dockerfile.omnibus-gitlab-opensuse15.1 | 8 ++++---- Dockerfile.omnibus-gitlab-opensuse15.2 | 8 ++++---- Dockerfile.omnibus-gitlab-opensuse15.3 | 8 ++++---- Dockerfile.omnibus-gitlab-stretch | 10 +++++----- Dockerfile.omnibus-gitlab-wheezy | 10 +++++----- Dockerfile.omnibus-gitlab-xenial | 8 +++----- Dockerfile.release-tools | 6 +++--- Dockerfile.www-gitlab-com-3.0 | 6 +++--- scripts/install-essentials | 4 ++-- scripts/install-www-gitlab-com | 4 ++-- 17 files changed, 60 insertions(+), 64 deletions(-) diff --git a/Dockerfile.custom b/Dockerfile.custom index ccbb140..62b9c05 100644 --- a/Dockerfile.custom +++ b/Dockerfile.custom @@ -81,10 +81,10 @@ ARG BAZELISK_DOWNLOAD_SHA256 RUN if [ -n "$BAZELISK_VERSION" ] ; then /scripts/install-bazelisk $BAZELISK_VERSION $BAZELISK_DOWNLOAD_SHA256; fi -RUN locale-gen en_US.UTF-8 -ENV LANG=en_US.UTF-8 \ - LANGUAGE=en_US:en \ - LC_ALL=en_US.UTF-8 +RUN locale-gen C.UTF-8 +ENV LANG=C.UTF-8 \ + LANGUAGE=C \ + LC_ALL=C.UTF-8 # Set as env variables all versions configured ENV RUBY_VERSION=${RUBY_VERSION} \ diff --git a/Dockerfile.omnibus-gitlab-bionic b/Dockerfile.omnibus-gitlab-bionic index 45d9b09..0c0d4b6 100644 --- a/Dockerfile.omnibus-gitlab-bionic +++ b/Dockerfile.omnibus-gitlab-bionic @@ -6,11 +6,9 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-buster b/Dockerfile.omnibus-gitlab-buster index 43c25ab..4685854 100644 --- a/Dockerfile.omnibus-gitlab-buster +++ b/Dockerfile.omnibus-gitlab-buster @@ -6,11 +6,11 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen +RUN locale-gen C.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 diff --git a/Dockerfile.omnibus-gitlab-centos7 b/Dockerfile.omnibus-gitlab-centos7 index 4f107b4..ce9c599 100644 --- a/Dockerfile.omnibus-gitlab-centos7 +++ b/Dockerfile.omnibus-gitlab-centos7 @@ -6,6 +6,8 @@ RUN yum update -y -q \ gcc gcc-c++ git make curl zlib-devel openssl-devel \ && yum clean all +# it seems C.UTF-8 is not available in centos-7 +# https://bugzilla.redhat.com/show_bug.cgi?id=1361965 ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 diff --git a/Dockerfile.omnibus-gitlab-centos8 b/Dockerfile.omnibus-gitlab-centos8 index ce98572..98de3e5 100644 --- a/Dockerfile.omnibus-gitlab-centos8 +++ b/Dockerfile.omnibus-gitlab-centos8 @@ -6,9 +6,9 @@ RUN yum update -y -q \ gcc gcc-c++ git make curl zlib-devel openssl-devel glibc-locale-source \ && yum clean all -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 -RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 +RUN localedef -c -f UTF-8 -i C C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-focal b/Dockerfile.omnibus-gitlab-focal index 81aee26..c1cfc86 100644 --- a/Dockerfile.omnibus-gitlab-focal +++ b/Dockerfile.omnibus-gitlab-focal @@ -6,11 +6,9 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-jessie b/Dockerfile.omnibus-gitlab-jessie index 6b86765..4ad84e1 100644 --- a/Dockerfile.omnibus-gitlab-jessie +++ b/Dockerfile.omnibus-gitlab-jessie @@ -6,11 +6,11 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen +RUN locale-gen C.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-opensuse15.1 b/Dockerfile.omnibus-gitlab-opensuse15.1 index faffef2..74c8d2f 100644 --- a/Dockerfile.omnibus-gitlab-opensuse15.1 +++ b/Dockerfile.omnibus-gitlab-opensuse15.1 @@ -6,10 +6,10 @@ RUN zypper -q -n --gpg-auto-import-keys update \ gcc gcc-c++ git make curl zlib-devel libopenssl-devel glibc-i18ndata glibc-locale hostname \ && zypper clean -a -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 -ENV LANGUAGE en_US:en -RUN localedef -i en_US -f UTF-8 en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 +ENV LANGUAGE C +RUN localedef -i C -f UTF-8 C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-opensuse15.2 b/Dockerfile.omnibus-gitlab-opensuse15.2 index 3f618c8..1ccc4db 100644 --- a/Dockerfile.omnibus-gitlab-opensuse15.2 +++ b/Dockerfile.omnibus-gitlab-opensuse15.2 @@ -6,10 +6,10 @@ RUN zypper -q -n --gpg-auto-import-keys update \ gcc gcc-c++ git make curl zlib-devel libopenssl-devel glibc-i18ndata glibc-locale hostname \ && zypper clean -a -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 -ENV LANGUAGE en_US:en -RUN localedef -i en_US -f UTF-8 en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 +ENV LANGUAGE C +RUN localedef -i C -f UTF-8 C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-opensuse15.3 b/Dockerfile.omnibus-gitlab-opensuse15.3 index 735d01a..98b08ba 100644 --- a/Dockerfile.omnibus-gitlab-opensuse15.3 +++ b/Dockerfile.omnibus-gitlab-opensuse15.3 @@ -6,10 +6,10 @@ RUN zypper -q -n --gpg-auto-import-keys update \ gcc gcc-c++ git make curl zlib-devel libopenssl-devel glibc-i18ndata glibc-locale hostname \ && zypper clean -a -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 -ENV LANGUAGE en_US:en -RUN localedef -i en_US -f UTF-8 en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 +ENV LANGUAGE C +RUN localedef -i C -f UTF-8 C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-stretch b/Dockerfile.omnibus-gitlab-stretch index 076638c..0326e83 100644 --- a/Dockerfile.omnibus-gitlab-stretch +++ b/Dockerfile.omnibus-gitlab-stretch @@ -6,11 +6,11 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen +RUN locale-gen C.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 diff --git a/Dockerfile.omnibus-gitlab-wheezy b/Dockerfile.omnibus-gitlab-wheezy index f468408..eb31301 100644 --- a/Dockerfile.omnibus-gitlab-wheezy +++ b/Dockerfile.omnibus-gitlab-wheezy @@ -6,11 +6,11 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen +RUN locale-gen C.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.omnibus-gitlab-xenial b/Dockerfile.omnibus-gitlab-xenial index a12f0d7..7c65668 100644 --- a/Dockerfile.omnibus-gitlab-xenial +++ b/Dockerfile.omnibus-gitlab-xenial @@ -6,11 +6,9 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 ENV RUBY_VERSION 2.6.5 RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ diff --git a/Dockerfile.release-tools b/Dockerfile.release-tools index d534667..aba3a70 100644 --- a/Dockerfile.release-tools +++ b/Dockerfile.release-tools @@ -3,6 +3,6 @@ FROM ruby:2.7-alpine RUN apk add --update --no-cache build-base cmake git openssh-client openssl-dev # Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 diff --git a/Dockerfile.www-gitlab-com-3.0 b/Dockerfile.www-gitlab-com-3.0 index d3ecb82..2f82bd4 100644 --- a/Dockerfile.www-gitlab-com-3.0 +++ b/Dockerfile.www-gitlab-com-3.0 @@ -12,6 +12,6 @@ RUN cd /usr/bin && find ../lib/google-cloud-sdk/bin -type f -executable -exec ln # Set UTF-8 http://jaredmarkell.com/docker-and-locales/ # Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG C.UTF-8 +ENV LANGUAGE C +ENV LC_ALL C.UTF-8 diff --git a/scripts/install-essentials b/scripts/install-essentials index d855a32..ac12ed4 100755 --- a/scripts/install-essentials +++ b/scripts/install-essentials @@ -37,10 +37,10 @@ fi # Set UTF-8 # http://stackoverflow.com/a/3182519/2137281 -LOC=$'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' +LOC=$'LC_ALL=C.UTF-8\nLANG=C.UTF-8' echo "$LOC" > /etc/environment cat /etc/environment -echo "en_US.UTF-8 UTF-8" > /etc/locale.gen +echo "C.UTF-8 UTF-8" > /etc/locale.gen locale-gen dpkg-reconfigure locales -f noninteractive -p critical locale -a diff --git a/scripts/install-www-gitlab-com b/scripts/install-www-gitlab-com index 14ff49e..3d1d55a 100755 --- a/scripts/install-www-gitlab-com +++ b/scripts/install-www-gitlab-com @@ -36,9 +36,9 @@ mv gitlab-ci-multi-runner-linux-amd64 /usr/bin/gitlab-runner-helper chmod +x /usr/bin/gitlab-runner-helper # Set UTF-8 -echo "en_US.UTF-8 UTF-8" > /etc/locale.gen +echo "C.UTF-8 UTF-8" > /etc/locale.gen locale-gen -update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_ALL=en_US.UTF-8 +update-locale LANG=C.UTF-8 LC_CTYPE=C.UTF-8 LC_ALL=C.UTF-8 locale -a # Clean up