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.
This commit is contained in:
Jan Provaznik 2021-11-26 13:29:09 +01:00
parent f77e611bdf
commit dd836768c3
4 changed files with 5 additions and 9 deletions

View file

@ -6,8 +6,6 @@ RUN apt-get update -q \
&& apt-get clean -yqq \ && apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/* && 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 LANG C.UTF-8
ENV LANGUAGE C ENV LANGUAGE C
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8

View file

@ -6,9 +6,11 @@ RUN yum update -y -q \
gcc gcc-c++ git make curl zlib-devel openssl-devel \ gcc gcc-c++ git make curl zlib-devel openssl-devel \
&& yum clean all && yum clean all
ENV LANG C.UTF-8 # it seems C.UTF-8 is not available in centos-7
ENV LC_ALL C.UTF-8 # https://bugzilla.redhat.com/show_bug.cgi?id=1361965
RUN localedef -c -f UTF-8 -i C C.UTF-8 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 ENV RUBY_VERSION 2.6.5
RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \ RUN curl -fsSL "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-${RUBY_VERSION}.tar.gz" \

View file

@ -6,8 +6,6 @@ RUN apt-get update -q \
&& apt-get clean -yqq \ && apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/* && 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 LANG C.UTF-8
ENV LANGUAGE C ENV LANGUAGE C
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8

View file

@ -6,8 +6,6 @@ RUN apt-get update -q \
&& apt-get clean -yqq \ && apt-get clean -yqq \
&& rm -rf /var/lib/apt/lists/* && 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 LANG C.UTF-8
ENV LANGUAGE C ENV LANGUAGE C
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8