From 8e49e25b591d4cfa6324b6dada4f16629a1e51ce Mon Sep 17 00:00:00 2001 From: Fumiaki MATSUSHIMA Date: Sat, 13 Jun 2020 13:37:45 +0900 Subject: [PATCH] Set LANG by default Ruby docker images officially provided by ruby-lang.org set `LANG` as `C.UTF-8` by default. https://hub.docker.com/r/rubylang/ruby/ https://github.com/ruby/ruby-docker-images/blob/36c5d8b68eb91e34825500e50ca677f5574401f7/Dockerfile#L3 https://github.com/docker-library/ruby/issues/45#issuecomment-117298344 > I'd rather see something more official from either Ruby or Rails upstreams > recommending a UTF-8 locale by default than just the anecdote that it's > "more common" or "more convenient". I think it's the one so we should set it by default. --- 2.5/alpine3.11/Dockerfile | 1 + 2.5/alpine3.12/Dockerfile | 1 + 2.5/buster/Dockerfile | 1 + 2.5/buster/slim/Dockerfile | 1 + 2.5/stretch/Dockerfile | 1 + 2.5/stretch/slim/Dockerfile | 1 + 2.6/alpine3.11/Dockerfile | 1 + 2.6/alpine3.12/Dockerfile | 1 + 2.6/buster/Dockerfile | 1 + 2.6/buster/slim/Dockerfile | 1 + 2.6/stretch/Dockerfile | 1 + 2.6/stretch/slim/Dockerfile | 1 + 2.7/alpine3.11/Dockerfile | 1 + 2.7/alpine3.12/Dockerfile | 1 + 2.7/buster/Dockerfile | 1 + 2.7/buster/slim/Dockerfile | 1 + Dockerfile-alpine.template | 1 + Dockerfile-debian.template | 1 + Dockerfile-slim.template | 1 + 19 files changed, 19 insertions(+) diff --git a/2.5/alpine3.11/Dockerfile b/2.5/alpine3.11/Dockerfile index 9c077a2e8..ead925c04 100644 --- a/2.5/alpine3.11/Dockerfile +++ b/2.5/alpine3.11/Dockerfile @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.5 ENV RUBY_VERSION 2.5.8 ENV RUBY_DOWNLOAD_SHA256 0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d diff --git a/2.5/alpine3.12/Dockerfile b/2.5/alpine3.12/Dockerfile index 4e72886b1..ae82cee2f 100644 --- a/2.5/alpine3.12/Dockerfile +++ b/2.5/alpine3.12/Dockerfile @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.5 ENV RUBY_VERSION 2.5.8 ENV RUBY_DOWNLOAD_SHA256 0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d diff --git a/2.5/buster/Dockerfile b/2.5/buster/Dockerfile index 69889c0f2..cee7ea7ba 100644 --- a/2.5/buster/Dockerfile +++ b/2.5/buster/Dockerfile @@ -8,6 +8,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.5 ENV RUBY_VERSION 2.5.8 ENV RUBY_DOWNLOAD_SHA256 0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d diff --git a/2.5/buster/slim/Dockerfile b/2.5/buster/slim/Dockerfile index cbb641b63..05c0daa25 100644 --- a/2.5/buster/slim/Dockerfile +++ b/2.5/buster/slim/Dockerfile @@ -22,6 +22,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.5 ENV RUBY_VERSION 2.5.8 ENV RUBY_DOWNLOAD_SHA256 0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d diff --git a/2.5/stretch/Dockerfile b/2.5/stretch/Dockerfile index 7c461bbeb..2edae2c2d 100644 --- a/2.5/stretch/Dockerfile +++ b/2.5/stretch/Dockerfile @@ -8,6 +8,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.5 ENV RUBY_VERSION 2.5.8 ENV RUBY_DOWNLOAD_SHA256 0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d diff --git a/2.5/stretch/slim/Dockerfile b/2.5/stretch/slim/Dockerfile index eff91d0d2..4297e7a4a 100644 --- a/2.5/stretch/slim/Dockerfile +++ b/2.5/stretch/slim/Dockerfile @@ -22,6 +22,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.5 ENV RUBY_VERSION 2.5.8 ENV RUBY_DOWNLOAD_SHA256 0391b2ffad3133e274469f9953ebfd0c9f7c186238968cbdeeb0651aa02a4d6d diff --git a/2.6/alpine3.11/Dockerfile b/2.6/alpine3.11/Dockerfile index 5f78e8059..b0aa8d860 100644 --- a/2.6/alpine3.11/Dockerfile +++ b/2.6/alpine3.11/Dockerfile @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.6 ENV RUBY_VERSION 2.6.6 ENV RUBY_DOWNLOAD_SHA256 5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f diff --git a/2.6/alpine3.12/Dockerfile b/2.6/alpine3.12/Dockerfile index f59cd698a..5ab1287e4 100644 --- a/2.6/alpine3.12/Dockerfile +++ b/2.6/alpine3.12/Dockerfile @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.6 ENV RUBY_VERSION 2.6.6 ENV RUBY_DOWNLOAD_SHA256 5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f diff --git a/2.6/buster/Dockerfile b/2.6/buster/Dockerfile index a674f91ec..6b805a515 100644 --- a/2.6/buster/Dockerfile +++ b/2.6/buster/Dockerfile @@ -8,6 +8,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.6 ENV RUBY_VERSION 2.6.6 ENV RUBY_DOWNLOAD_SHA256 5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f diff --git a/2.6/buster/slim/Dockerfile b/2.6/buster/slim/Dockerfile index 22c3b4f38..50bb84091 100644 --- a/2.6/buster/slim/Dockerfile +++ b/2.6/buster/slim/Dockerfile @@ -22,6 +22,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.6 ENV RUBY_VERSION 2.6.6 ENV RUBY_DOWNLOAD_SHA256 5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f diff --git a/2.6/stretch/Dockerfile b/2.6/stretch/Dockerfile index d1f91b35e..c75009439 100644 --- a/2.6/stretch/Dockerfile +++ b/2.6/stretch/Dockerfile @@ -8,6 +8,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.6 ENV RUBY_VERSION 2.6.6 ENV RUBY_DOWNLOAD_SHA256 5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f diff --git a/2.6/stretch/slim/Dockerfile b/2.6/stretch/slim/Dockerfile index 49b5d1c0d..f48b28a98 100644 --- a/2.6/stretch/slim/Dockerfile +++ b/2.6/stretch/slim/Dockerfile @@ -22,6 +22,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.6 ENV RUBY_VERSION 2.6.6 ENV RUBY_DOWNLOAD_SHA256 5db187882b7ac34016cd48d7032e197f07e4968f406b0690e20193b9b424841f diff --git a/2.7/alpine3.11/Dockerfile b/2.7/alpine3.11/Dockerfile index 0936248b6..d79df1ee7 100644 --- a/2.7/alpine3.11/Dockerfile +++ b/2.7/alpine3.11/Dockerfile @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.7 ENV RUBY_VERSION 2.7.1 ENV RUBY_DOWNLOAD_SHA256 b224f9844646cc92765df8288a46838511c1cec5b550d8874bd4686a904fcee7 diff --git a/2.7/alpine3.12/Dockerfile b/2.7/alpine3.12/Dockerfile index 6f45f215f..3bee12933 100644 --- a/2.7/alpine3.12/Dockerfile +++ b/2.7/alpine3.12/Dockerfile @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.7 ENV RUBY_VERSION 2.7.1 ENV RUBY_DOWNLOAD_SHA256 b224f9844646cc92765df8288a46838511c1cec5b550d8874bd4686a904fcee7 diff --git a/2.7/buster/Dockerfile b/2.7/buster/Dockerfile index 87d102d00..12efa7fb2 100644 --- a/2.7/buster/Dockerfile +++ b/2.7/buster/Dockerfile @@ -8,6 +8,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.7 ENV RUBY_VERSION 2.7.1 ENV RUBY_DOWNLOAD_SHA256 b224f9844646cc92765df8288a46838511c1cec5b550d8874bd4686a904fcee7 diff --git a/2.7/buster/slim/Dockerfile b/2.7/buster/slim/Dockerfile index e1a9bdbca..bf5a4aee8 100644 --- a/2.7/buster/slim/Dockerfile +++ b/2.7/buster/slim/Dockerfile @@ -22,6 +22,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR 2.7 ENV RUBY_VERSION 2.7.1 ENV RUBY_DOWNLOAD_SHA256 b224f9844646cc92765df8288a46838511c1cec5b550d8874bd4686a904fcee7 diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 1a72213bd..71bff794d 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -11,6 +11,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR %%VERSION%% ENV RUBY_VERSION %%FULL_VERSION%% ENV RUBY_DOWNLOAD_SHA256 %%SHA256%% diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 33314a135..6df3acde7 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -8,6 +8,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR %%VERSION%% ENV RUBY_VERSION %%FULL_VERSION%% ENV RUBY_DOWNLOAD_SHA256 %%SHA256%% diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index e286ccc34..4ba64e7ea 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -22,6 +22,7 @@ RUN set -eux; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc +ENV LANG C.UTF-8 ENV RUBY_MAJOR %%VERSION%% ENV RUBY_VERSION %%FULL_VERSION%% ENV RUBY_DOWNLOAD_SHA256 %%SHA256%%