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 c23adc3660..f041772271 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 fea4377ce6..81fe32a009 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 3211192173..a2b97e9f35 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 245e907bab..627cd46b6f 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 6d83ac0675..eb96f931b9 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 22a77ef17f..3d51740b9d 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 0c31f8f0a5..30919ed40e 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 baf89084a7..1c1b1a8bac 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 a4b7dbc9de..394e1ea1f5 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 6bc60d287e..9dbdf061dd 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 4d9a904c0b..7142b0f356 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 d1e1b7f222..8d278ff263 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 8eae154635..4fdc15b5e2 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 f09af2234c..a12746bb93 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 5b2e811d0e..1b70985936 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 2dba313aef..330629dda2 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 8ad3904d07..6730cf491c 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 72152688f8..d68cc7a2b5 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 383677edd0..7d62a786aa 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 07c7820f05..9ae3322aad 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 2b05b59294..b7255c4144 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 77f24fe450..22337629c7 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 b1244cda92..0eea038c9a 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 67435a9410..412425643e 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 ceb8c320e5..3c17e98577 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