From 780654067ddce418269e6710c13b75de288c3c0d Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:18:01 +0100 Subject: [PATCH] Simplify gemrc nodoc Per https://stackoverflow.com/questions/1381725/how-to-make-no-ri-no-rdoc-the-default-for-gem-install#comment22636260_7662245 this is possible since rubygems 2.0.0 from 2012. I updated the comment to indicate this is only for the `gem` command, bundler already doesn't do this by default. It works: ``` $ gem install rubocop -v 1.69.0 Fetching rubocop-1.69.0.gem Successfully installed rubocop-1.69.0 1 gem installed $ gem update rubocop Updating installed gems Updating rubocop Fetching rubocop-1.69.1.gem Successfully installed rubocop-1.69.1 Gems updated: rubocop ``` --- 3.1/alpine3.20/Dockerfile | 7 ++----- 3.1/alpine3.21/Dockerfile | 7 ++----- 3.1/bookworm/Dockerfile | 7 ++----- 3.1/bullseye/Dockerfile | 7 ++----- 3.1/slim-bookworm/Dockerfile | 7 ++----- 3.1/slim-bullseye/Dockerfile | 7 ++----- 3.2/alpine3.20/Dockerfile | 7 ++----- 3.2/alpine3.21/Dockerfile | 7 ++----- 3.2/bookworm/Dockerfile | 7 ++----- 3.2/bullseye/Dockerfile | 7 ++----- 3.2/slim-bookworm/Dockerfile | 7 ++----- 3.2/slim-bullseye/Dockerfile | 7 ++----- 3.3/alpine3.20/Dockerfile | 7 ++----- 3.3/alpine3.21/Dockerfile | 7 ++----- 3.3/bookworm/Dockerfile | 7 ++----- 3.3/bullseye/Dockerfile | 7 ++----- 3.3/slim-bookworm/Dockerfile | 7 ++----- 3.3/slim-bullseye/Dockerfile | 7 ++----- 3.4-rc/alpine3.20/Dockerfile | 7 ++----- 3.4-rc/alpine3.21/Dockerfile | 7 ++----- 3.4-rc/bookworm/Dockerfile | 7 ++----- 3.4-rc/bullseye/Dockerfile | 7 ++----- 3.4-rc/slim-bookworm/Dockerfile | 7 ++----- 3.4-rc/slim-bullseye/Dockerfile | 7 ++----- Dockerfile.template | 7 ++----- 25 files changed, 50 insertions(+), 125 deletions(-) diff --git a/3.1/alpine3.20/Dockerfile b/3.1/alpine3.20/Dockerfile index c23adc366..f04177227 100644 --- a/3.1/alpine3.20/Dockerfile +++ b/3.1/alpine3.20/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.1/alpine3.21/Dockerfile b/3.1/alpine3.21/Dockerfile index fea4377ce..81fe32a00 100644 --- a/3.1/alpine3.21/Dockerfile +++ b/3.1/alpine3.21/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.1/bookworm/Dockerfile b/3.1/bookworm/Dockerfile index 321119217..a2b97e9f3 100644 --- a/3.1/bookworm/Dockerfile +++ b/3.1/bookworm/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bookworm -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.1/bullseye/Dockerfile b/3.1/bullseye/Dockerfile index 245e907ba..627cd46b6 100644 --- a/3.1/bullseye/Dockerfile +++ b/3.1/bullseye/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bullseye -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.1/slim-bookworm/Dockerfile b/3.1/slim-bookworm/Dockerfile index 6d83ac067..eb96f931b 100644 --- a/3.1/slim-bookworm/Dockerfile +++ b/3.1/slim-bookworm/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.1/slim-bullseye/Dockerfile b/3.1/slim-bullseye/Dockerfile index 22a77ef17..3d51740b9 100644 --- a/3.1/slim-bullseye/Dockerfile +++ b/3.1/slim-bullseye/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.2/alpine3.20/Dockerfile b/3.2/alpine3.20/Dockerfile index 0c31f8f0a..30919ed40 100644 --- a/3.2/alpine3.20/Dockerfile +++ b/3.2/alpine3.20/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.2/alpine3.21/Dockerfile b/3.2/alpine3.21/Dockerfile index baf89084a..1c1b1a8ba 100644 --- a/3.2/alpine3.21/Dockerfile +++ b/3.2/alpine3.21/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.2/bookworm/Dockerfile b/3.2/bookworm/Dockerfile index a4b7dbc9d..394e1ea1f 100644 --- a/3.2/bookworm/Dockerfile +++ b/3.2/bookworm/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bookworm -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.2/bullseye/Dockerfile b/3.2/bullseye/Dockerfile index 6bc60d287..9dbdf061d 100644 --- a/3.2/bullseye/Dockerfile +++ b/3.2/bullseye/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bullseye -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.2/slim-bookworm/Dockerfile b/3.2/slim-bookworm/Dockerfile index 4d9a904c0..7142b0f35 100644 --- a/3.2/slim-bookworm/Dockerfile +++ b/3.2/slim-bookworm/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.2/slim-bullseye/Dockerfile b/3.2/slim-bullseye/Dockerfile index d1e1b7f22..8d278ff26 100644 --- a/3.2/slim-bullseye/Dockerfile +++ b/3.2/slim-bullseye/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.3/alpine3.20/Dockerfile b/3.3/alpine3.20/Dockerfile index 8eae15463..4fdc15b5e 100644 --- a/3.3/alpine3.20/Dockerfile +++ b/3.3/alpine3.20/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.3/alpine3.21/Dockerfile b/3.3/alpine3.21/Dockerfile index f09af2234..a12746bb9 100644 --- a/3.3/alpine3.21/Dockerfile +++ b/3.3/alpine3.21/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.3/bookworm/Dockerfile b/3.3/bookworm/Dockerfile index 5b2e811d0..1b7098593 100644 --- a/3.3/bookworm/Dockerfile +++ b/3.3/bookworm/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bookworm -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.3/bullseye/Dockerfile b/3.3/bullseye/Dockerfile index 2dba313ae..330629dda 100644 --- a/3.3/bullseye/Dockerfile +++ b/3.3/bullseye/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bullseye -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.3/slim-bookworm/Dockerfile b/3.3/slim-bookworm/Dockerfile index 8ad3904d0..6730cf491 100644 --- a/3.3/slim-bookworm/Dockerfile +++ b/3.3/slim-bookworm/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.3/slim-bullseye/Dockerfile b/3.3/slim-bullseye/Dockerfile index 72152688f..d68cc7a2b 100644 --- a/3.3/slim-bullseye/Dockerfile +++ b/3.3/slim-bullseye/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.4-rc/alpine3.20/Dockerfile b/3.4-rc/alpine3.20/Dockerfile index 383677edd..7d62a786a 100644 --- a/3.4-rc/alpine3.20/Dockerfile +++ b/3.4-rc/alpine3.20/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.4-rc/alpine3.21/Dockerfile b/3.4-rc/alpine3.21/Dockerfile index 07c7820f0..9ae3322aa 100644 --- a/3.4-rc/alpine3.21/Dockerfile +++ b/3.4-rc/alpine3.21/Dockerfile @@ -17,13 +17,10 @@ RUN set -eux; \ zlib-dev \ ; -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.4-rc/bookworm/Dockerfile b/3.4-rc/bookworm/Dockerfile index 2b05b5929..b7255c414 100644 --- a/3.4-rc/bookworm/Dockerfile +++ b/3.4-rc/bookworm/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bookworm -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.4-rc/bullseye/Dockerfile b/3.4-rc/bullseye/Dockerfile index 77f24fe45..22337629c 100644 --- a/3.4-rc/bullseye/Dockerfile +++ b/3.4-rc/bullseye/Dockerfile @@ -6,13 +6,10 @@ FROM buildpack-deps:bullseye -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.4-rc/slim-bookworm/Dockerfile b/3.4-rc/slim-bookworm/Dockerfile index b1244cda9..0eea038c9 100644 --- a/3.4-rc/slim-bookworm/Dockerfile +++ b/3.4-rc/slim-bookworm/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/3.4-rc/slim-bullseye/Dockerfile b/3.4-rc/slim-bullseye/Dockerfile index 67435a941..412425643 100644 --- a/3.4-rc/slim-bullseye/Dockerfile +++ b/3.4-rc/slim-bullseye/Dockerfile @@ -20,13 +20,10 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8 diff --git a/Dockerfile.template b/Dockerfile.template index ceb8c320e..3c17e9857 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -41,13 +41,10 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* {{ ) else "" end -}} -# skip installing gem documentation +# skip installing gem documentation with `gem install`/`gem update` RUN set -eux; \ mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc + echo 'gem: --no-document' >> /usr/local/etc/gemrc ENV LANG C.UTF-8