From bce2a71b583bb9d1a9de16542c711262cafc14a3 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Thu, 21 Nov 2024 11:47:16 +0100 Subject: [PATCH] Add Ruby 2.1 to 2.6 to centos --- .github/workflows/build-ruby.yml | 24 ++++ src/engines/ruby/2.1/Dockerfile.centos | 151 +++++++++++++++++++++++++ src/engines/ruby/2.2/Dockerfile.centos | 151 +++++++++++++++++++++++++ src/engines/ruby/2.3/Dockerfile.centos | 150 ++++++++++++++++++++++++ src/engines/ruby/2.4/Dockerfile.centos | 150 ++++++++++++++++++++++++ src/engines/ruby/2.5/Dockerfile.centos | 150 ++++++++++++++++++++++++ src/engines/ruby/2.6/Dockerfile.centos | 150 ++++++++++++++++++++++++ 7 files changed, 926 insertions(+) create mode 100644 src/engines/ruby/2.1/Dockerfile.centos create mode 100644 src/engines/ruby/2.2/Dockerfile.centos create mode 100644 src/engines/ruby/2.3/Dockerfile.centos create mode 100644 src/engines/ruby/2.4/Dockerfile.centos create mode 100644 src/engines/ruby/2.5/Dockerfile.centos create mode 100644 src/engines/ruby/2.6/Dockerfile.centos diff --git a/.github/workflows/build-ruby.yml b/.github/workflows/build-ruby.yml index 8e89a18..3a474a4 100644 --- a/.github/workflows/build-ruby.yml +++ b/.github/workflows/build-ruby.yml @@ -145,6 +145,30 @@ jobs: libc: musl arch: ["x86_64", "aarch64"] # centos + - engine: ruby + version: "2.1" + libc: centos + arch: ["x86_64", "aarch64"] + - engine: ruby + version: "2.2" + libc: centos + arch: ["x86_64", "aarch64"] + - engine: ruby + version: "2.3" + libc: centos + arch: ["x86_64", "aarch64"] + - engine: ruby + version: "2.4" + libc: centos + arch: ["x86_64", "aarch64"] + - engine: ruby + version: "2.5" + libc: centos + arch: ["x86_64", "aarch64"] + - engine: ruby + version: "2.6" + libc: centos + arch: ["x86_64", "aarch64"] - engine: ruby version: "2.7" libc: centos diff --git a/src/engines/ruby/2.1/Dockerfile.centos b/src/engines/ruby/2.1/Dockerfile.centos new file mode 100644 index 0000000..b8cb97c --- /dev/null +++ b/src/engines/ruby/2.1/Dockerfile.centos @@ -0,0 +1,151 @@ +# CentOS 7.9 has glibc 2.17 +FROM public.ecr.aws/docker/library/centos:centos7.9.2009 + +# Set yum vault +RUN < /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/${repo_version}/os/\$basearch/ +gpgcheck=0 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/${repo_version}/updates/\$basearch/ +gpgcheck=0 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/${repo_version}/extras/\$basearch/ +gpgcheck=0 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/${repo_version}/centosplus/\$basearch/ +gpgcheck=0 +enabled=0 +EOF +SHELL + +RUN yum makecache -y + +# localedef has been forcefully removed by: +# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} +# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'( +RUN yum reinstall -y glibc-common + +RUN yum install -y curl gcc make + +# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure +# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors +RUN <&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi +SHELL + +# Skip installing gem documentation +COPY < file.c.new +mv file.c.new file.c + +autoconf + +gnuArch="$(gcc -dumpmachine)" +./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --disable-shared +make -j "$(nproc)" +make install + +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r dpkg-query --search \ +# | cut -d: -f1 \ +# | sort -u \ +# | xargs -r apt-mark manual \ +# +# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +# +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | grep -v '=>' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r rpm -qf \ +# | sort -u \ +# | xargs -r yum ?mark-manual? +# +# yum autoremove -y +# yum remove --setopt=clean_requirements_on_remove=1 +# package-cleanup --leaves && yum autoremove # yum-utils +# sudo yum history list pdftk +# sudo yum history undo 88 + +cd / +rm -r /usr/src/ruby +if yum list installed ruby; then exit 1; fi + +# update gem version +gem update --system 2.7.11 +gem install bundler --version 1.17.3 --force + +# rough smoke test +ruby --version +gem --version +bundle --version + +SHELL + +# don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $GEM_HOME/bin:$PATH + +# adjust permissions of a few directories for running "gem install" as an arbitrary user +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" + +CMD [ "irb" ] + diff --git a/src/engines/ruby/2.2/Dockerfile.centos b/src/engines/ruby/2.2/Dockerfile.centos new file mode 100644 index 0000000..f4eb6da --- /dev/null +++ b/src/engines/ruby/2.2/Dockerfile.centos @@ -0,0 +1,151 @@ +# CentOS 7.9 has glibc 2.17 +FROM public.ecr.aws/docker/library/centos:centos7.9.2009 + +# Set yum vault +RUN < /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/${repo_version}/os/\$basearch/ +gpgcheck=0 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/${repo_version}/updates/\$basearch/ +gpgcheck=0 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/${repo_version}/extras/\$basearch/ +gpgcheck=0 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/${repo_version}/centosplus/\$basearch/ +gpgcheck=0 +enabled=0 +EOF +SHELL + +RUN yum makecache -y + +# localedef has been forcefully removed by: +# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} +# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'( +RUN yum reinstall -y glibc-common + +RUN yum install -y curl gcc make + +# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure +# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors +RUN <&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi +SHELL + +# Skip installing gem documentation +COPY < file.c.new +mv file.c.new file.c + +autoconf + +gnuArch="$(gcc -dumpmachine)" +./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --disable-shared +make -j "$(nproc)" +make install + +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r dpkg-query --search \ +# | cut -d: -f1 \ +# | sort -u \ +# | xargs -r apt-mark manual \ +# +# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +# +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | grep -v '=>' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r rpm -qf \ +# | sort -u \ +# | xargs -r yum ?mark-manual? +# +# yum autoremove -y +# yum remove --setopt=clean_requirements_on_remove=1 +# package-cleanup --leaves && yum autoremove # yum-utils +# sudo yum history list pdftk +# sudo yum history undo 88 + +cd / +rm -r /usr/src/ruby +if yum list installed ruby; then exit 1; fi + +# update gem version +gem update --system 2.7.11 +gem install bundler --version 1.17.3 --force + +# rough smoke test +ruby --version +gem --version +bundle --version + +SHELL + +# don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $GEM_HOME/bin:$PATH + +# adjust permissions of a few directories for running "gem install" as an arbitrary user +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" + +CMD [ "irb" ] + diff --git a/src/engines/ruby/2.3/Dockerfile.centos b/src/engines/ruby/2.3/Dockerfile.centos new file mode 100644 index 0000000..6c72eee --- /dev/null +++ b/src/engines/ruby/2.3/Dockerfile.centos @@ -0,0 +1,150 @@ +# CentOS 7.9 has glibc 2.17 +FROM public.ecr.aws/docker/library/centos:centos7.9.2009 + +# Set yum vault +RUN < /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/${repo_version}/os/\$basearch/ +gpgcheck=0 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/${repo_version}/updates/\$basearch/ +gpgcheck=0 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/${repo_version}/extras/\$basearch/ +gpgcheck=0 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/${repo_version}/centosplus/\$basearch/ +gpgcheck=0 +enabled=0 +EOF +SHELL + +RUN yum makecache -y + +# localedef has been forcefully removed by: +# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} +# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'( +RUN yum reinstall -y glibc-common + +RUN yum install -y curl gcc make + +# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure +# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors +RUN <&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi +SHELL + +# Skip installing gem documentation +COPY < file.c.new +mv file.c.new file.c + +autoconf + +gnuArch="$(gcc -dumpmachine)" +./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --disable-shared +make -j "$(nproc)" +make install + +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r dpkg-query --search \ +# | cut -d: -f1 \ +# | sort -u \ +# | xargs -r apt-mark manual \ +# +# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +# +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | grep -v '=>' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r rpm -qf \ +# | sort -u \ +# | xargs -r yum ?mark-manual? +# +# yum autoremove -y +# yum remove --setopt=clean_requirements_on_remove=1 +# package-cleanup --leaves && yum autoremove # yum-utils +# sudo yum history list pdftk +# sudo yum history undo 88 + +cd / +rm -r /usr/src/ruby +if yum list installed ruby; then exit 1; fi + +# update gem version +gem update --system 3.3.27 + +# rough smoke test +ruby --version +gem --version +bundle --version + +SHELL + +# don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $GEM_HOME/bin:$PATH + +# adjust permissions of a few directories for running "gem install" as an arbitrary user +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" + +CMD [ "irb" ] + diff --git a/src/engines/ruby/2.4/Dockerfile.centos b/src/engines/ruby/2.4/Dockerfile.centos new file mode 100644 index 0000000..176a6e7 --- /dev/null +++ b/src/engines/ruby/2.4/Dockerfile.centos @@ -0,0 +1,150 @@ +# CentOS 7.9 has glibc 2.17 +FROM public.ecr.aws/docker/library/centos:centos7.9.2009 + +# Set yum vault +RUN < /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/${repo_version}/os/\$basearch/ +gpgcheck=0 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/${repo_version}/updates/\$basearch/ +gpgcheck=0 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/${repo_version}/extras/\$basearch/ +gpgcheck=0 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/${repo_version}/centosplus/\$basearch/ +gpgcheck=0 +enabled=0 +EOF +SHELL + +RUN yum makecache -y + +# localedef has been forcefully removed by: +# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} +# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'( +RUN yum reinstall -y glibc-common + +RUN yum install -y curl gcc make + +# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure +# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors +RUN <&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi +SHELL + +# Skip installing gem documentation +COPY < file.c.new +mv file.c.new file.c + +autoconf + +gnuArch="$(gcc -dumpmachine)" +./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --disable-shared +make -j "$(nproc)" +make install + +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r dpkg-query --search \ +# | cut -d: -f1 \ +# | sort -u \ +# | xargs -r apt-mark manual \ +# +# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +# +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | grep -v '=>' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r rpm -qf \ +# | sort -u \ +# | xargs -r yum ?mark-manual? +# +# yum autoremove -y +# yum remove --setopt=clean_requirements_on_remove=1 +# package-cleanup --leaves && yum autoremove # yum-utils +# sudo yum history list pdftk +# sudo yum history undo 88 + +cd / +rm -r /usr/src/ruby +if yum list installed ruby; then exit 1; fi + +# update gem version +gem update --system 3.3.27 + +# rough smoke test +ruby --version +gem --version +bundle --version + +SHELL + +# don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $GEM_HOME/bin:$PATH + +# adjust permissions of a few directories for running "gem install" as an arbitrary user +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" + +CMD [ "irb" ] + diff --git a/src/engines/ruby/2.5/Dockerfile.centos b/src/engines/ruby/2.5/Dockerfile.centos new file mode 100644 index 0000000..6ae2b1e --- /dev/null +++ b/src/engines/ruby/2.5/Dockerfile.centos @@ -0,0 +1,150 @@ +# CentOS 7.9 has glibc 2.17 +FROM public.ecr.aws/docker/library/centos:centos7.9.2009 + +# Set yum vault +RUN < /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/${repo_version}/os/\$basearch/ +gpgcheck=0 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/${repo_version}/updates/\$basearch/ +gpgcheck=0 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/${repo_version}/extras/\$basearch/ +gpgcheck=0 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/${repo_version}/centosplus/\$basearch/ +gpgcheck=0 +enabled=0 +EOF +SHELL + +RUN yum makecache -y + +# localedef has been forcefully removed by: +# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} +# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'( +RUN yum reinstall -y glibc-common + +RUN yum install -y curl gcc make + +# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure +# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors +RUN <&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi +SHELL + +# Skip installing gem documentation +COPY < file.c.new +mv file.c.new file.c + +autoconf + +gnuArch="$(gcc -dumpmachine)" +./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --disable-shared +make -j "$(nproc)" +make install + +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r dpkg-query --search \ +# | cut -d: -f1 \ +# | sort -u \ +# | xargs -r apt-mark manual \ +# +# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +# +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | grep -v '=>' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r rpm -qf \ +# | sort -u \ +# | xargs -r yum ?mark-manual? +# +# yum autoremove -y +# yum remove --setopt=clean_requirements_on_remove=1 +# package-cleanup --leaves && yum autoremove # yum-utils +# sudo yum history list pdftk +# sudo yum history undo 88 + +cd / +rm -r /usr/src/ruby +if yum list installed ruby; then exit 1; fi + +# update gem version +gem update --system 3.3.27 + +# rough smoke test +ruby --version +gem --version +bundle --version + +SHELL + +# don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $GEM_HOME/bin:$PATH + +# adjust permissions of a few directories for running "gem install" as an arbitrary user +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" + +CMD [ "irb" ] + diff --git a/src/engines/ruby/2.6/Dockerfile.centos b/src/engines/ruby/2.6/Dockerfile.centos new file mode 100644 index 0000000..a2a65e5 --- /dev/null +++ b/src/engines/ruby/2.6/Dockerfile.centos @@ -0,0 +1,150 @@ +# CentOS 7.9 has glibc 2.17 +FROM public.ecr.aws/docker/library/centos:centos7.9.2009 + +# Set yum vault +RUN < /etc/yum.repos.d/CentOS-Base.repo +[base] +name=CentOS-\$releasever - Base +baseurl=http://vault.centos.org/${repo_version}/os/\$basearch/ +gpgcheck=0 + +[updates] +name=CentOS-\$releasever - Updates +baseurl=http://vault.centos.org/${repo_version}/updates/\$basearch/ +gpgcheck=0 + +[extras] +name=CentOS-\$releasever - Extras +baseurl=http://vault.centos.org/${repo_version}/extras/\$basearch/ +gpgcheck=0 + +[centosplus] +name=CentOS-\$releasever - Plus +baseurl=http://vault.centos.org/${repo_version}/centosplus/\$basearch/ +gpgcheck=0 +enabled=0 +EOF +SHELL + +RUN yum makecache -y + +# localedef has been forcefully removed by: +# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} +# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'( +RUN yum reinstall -y glibc-common + +RUN yum install -y curl gcc make + +# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure +# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors +RUN <&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi +SHELL + +# Skip installing gem documentation +COPY < file.c.new +mv file.c.new file.c + +autoconf + +gnuArch="$(gcc -dumpmachine)" +./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --disable-shared +make -j "$(nproc)" +make install + +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r dpkg-query --search \ +# | cut -d: -f1 \ +# | sort -u \ +# | xargs -r apt-mark manual \ +# +# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +# +# find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ +# | awk '/=>/ { print $(NF-1) }' \ +# | grep -v '=>' \ +# | sort -u \ +# | grep -vE '^/usr/local/lib/' \ +# | xargs -r rpm -qf \ +# | sort -u \ +# | xargs -r yum ?mark-manual? +# +# yum autoremove -y +# yum remove --setopt=clean_requirements_on_remove=1 +# package-cleanup --leaves && yum autoremove # yum-utils +# sudo yum history list pdftk +# sudo yum history undo 88 + +cd / +rm -r /usr/src/ruby +if yum list installed ruby; then exit 1; fi + +# update gem version +gem update --system 3.3.27 + +# rough smoke test +ruby --version +gem --version +bundle --version + +SHELL + +# don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $GEM_HOME/bin:$PATH + +# adjust permissions of a few directories for running "gem install" as an arbitrary user +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" + +CMD [ "irb" ] +