From dd836768c3a76d7dc365b8493444ace919074613 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Fri, 26 Nov 2021 13:29:09 +0100 Subject: [PATCH] Skip locale-gen for some ubuntu distros C.UTF-8 is pregenerated anyway, so no need to re-run it. Also defaults to en_US for centos 7 because C.UTF-8 is not available there. --- Dockerfile.omnibus-gitlab-bionic | 2 -- Dockerfile.omnibus-gitlab-centos7 | 8 +++++--- Dockerfile.omnibus-gitlab-focal | 2 -- Dockerfile.omnibus-gitlab-xenial | 2 -- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Dockerfile.omnibus-gitlab-bionic b/Dockerfile.omnibus-gitlab-bionic index c41ee9a..0c0d4b6 100644 --- a/Dockerfile.omnibus-gitlab-bionic +++ b/Dockerfile.omnibus-gitlab-bionic @@ -6,8 +6,6 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -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 diff --git a/Dockerfile.omnibus-gitlab-centos7 b/Dockerfile.omnibus-gitlab-centos7 index e0ae3ab..ce9c599 100644 --- a/Dockerfile.omnibus-gitlab-centos7 +++ b/Dockerfile.omnibus-gitlab-centos7 @@ -6,9 +6,11 @@ RUN yum update -y -q \ gcc gcc-c++ git make curl zlib-devel openssl-devel \ && yum clean all -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -RUN localedef -c -f UTF-8 -i C C.UTF-8 +# 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 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 249eee8..c1cfc86 100644 --- a/Dockerfile.omnibus-gitlab-focal +++ b/Dockerfile.omnibus-gitlab-focal @@ -6,8 +6,6 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -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 diff --git a/Dockerfile.omnibus-gitlab-xenial b/Dockerfile.omnibus-gitlab-xenial index 1644c8a..7c65668 100644 --- a/Dockerfile.omnibus-gitlab-xenial +++ b/Dockerfile.omnibus-gitlab-xenial @@ -6,8 +6,6 @@ RUN apt-get update -q \ && apt-get clean -yqq \ && rm -rf /var/lib/apt/lists/* -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