diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 90ec81c..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/*/**/Dockerfile linguist-generated -/Dockerfile*.template linguist-language=Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index aec135b..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: GitHub CI - -on: - # pull_request: - # push: - workflow_dispatch: - # schedule: - # - cron: 0 0 * * 0 - -defaults: - run: - shell: 'bash -Eeuo pipefail -x {0}' - -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - - generate-jobs: - name: Generate Jobs - runs-on: ubuntu-latest - outputs: - strategy: ${{ steps.generate-jobs.outputs.strategy }} - steps: - - uses: actions/checkout@v4 - - uses: docker-library/bashbrew@HEAD - - id: generate-jobs - name: Generate Jobs - run: | - strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" - - EOF="EOF-$RANDOM-$RANDOM-$RANDOM" - echo "strategy<<$EOF" >> "$GITHUB_OUTPUT" - jq <<<"$strategy" . | tee -a "$GITHUB_OUTPUT" - echo "$EOF" >> "$GITHUB_OUTPUT" - - test: - needs: generate-jobs - strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }} - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Prepare Environment - run: ${{ matrix.runs.prepare }} - - name: Pull Dependencies - run: ${{ matrix.runs.pull }} - - name: Build ${{ matrix.name }} - run: ${{ matrix.runs.build }} - - name: History ${{ matrix.name }} - run: ${{ matrix.runs.history }} - - name: Test ${{ matrix.name }} - run: ${{ matrix.runs.test }} - - name: '"docker images"' - run: ${{ matrix.runs.images }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d91522a..706be37 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -29,6 +29,8 @@ jobs: revision: ${{ steps.fetch-revision.outputs.revision }} steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Download source run: curl -o ruby.tar.xz https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.tar.xz - uses: actions/upload-artifact@v4 @@ -42,10 +44,10 @@ jobs: - id: fetch-json run: echo "json=$(./nightly-versions.rb)" >> "$GITHUB_OUTPUT" - id: fetch-date - run: echo "date=$(jq -r .master.date versions.json)" >> $GITHUB_OUTPUT + run: echo "date=$(jq -r .master.date docker-ruby/versions.json)" >> $GITHUB_OUTPUT - id: fetch-revision run: echo revision=$(tar -xf ruby.tar.xz snapshot-master/revision.h -O | grep -oP '(?<=RUBY_REVISION ")(.*)(?=")') >> $GITHUB_OUTPUT - - run: ./apply-templates.sh + - run: cd docker-ruby && ./apply-templates.sh - id: fetch-matrix run: echo "images=$(./images.rb)" >> "$GITHUB_OUTPUT" @@ -61,8 +63,11 @@ jobs: name: ${{ matrix.image.variant }} - ${{ matrix.image.platform }} steps: - uses: actions/checkout@v4 - - run: echo '${{ needs.set-up-matrix.outputs.json }}' > versions.json - - run: ./apply-templates.sh + with: + submodules: true + - run: echo '${{ needs.set-up-matrix.outputs.json }}' > docker-ruby/versions.json + - run: cd docker-ruby && git apply ../Dockerfile.template.patch + - run: cd docker-ruby && ./apply-templates.sh - name: Docker meta id: meta @@ -89,13 +94,13 @@ jobs: - uses: actions/download-artifact@v4 with: name: snapshot-master - path: ./master/${{ matrix.image.variant }} + path: ./docker-ruby/master/${{ matrix.image.variant }} - name: Build and push by digest id: build uses: docker/build-push-action@v6 with: - context: ./master/${{ matrix.image.variant }} + context: ./docker-ruby/master/${{ matrix.image.variant }} platforms: ${{ matrix.image.platform }} outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true @@ -187,6 +192,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/download-artifact@v4 with: name: snapshot-master diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml deleted file mode 100644 index 1f446c0..0000000 --- a/.github/workflows/verify-templating.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Verify Templating - -on: - pull_request: - # push: - -defaults: - run: - shell: 'bash -Eeuo pipefail -x {0}' - -jobs: - apply-templates: - name: Check For Uncomitted Changes - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Apply Templates - run: ./apply-templates.sh - - name: Check Git Status - run: | - status="$(git status --short)" - [ -z "$status" ] diff --git a/.gitignore b/.gitignore deleted file mode 100644 index da4ffd7..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.jq-template.awk -.yq* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c74b8c9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docker-ruby"] + path = docker-ruby + url = https://github.com/docker-library/ruby.git diff --git a/3.1/alpine3.20/Dockerfile b/3.1/alpine3.20/Dockerfile deleted file mode 100644 index c23adc3..0000000 --- a/3.1/alpine3.20/Dockerfile +++ /dev/null @@ -1,141 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.20 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/05/29/ruby-3-1-6-released/ -ENV RUBY_VERSION 3.1.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bison \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - readline-dev \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.1/alpine3.21/Dockerfile b/3.1/alpine3.21/Dockerfile deleted file mode 100644 index fea4377..0000000 --- a/3.1/alpine3.21/Dockerfile +++ /dev/null @@ -1,141 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.21 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/05/29/ruby-3-1-6-released/ -ENV RUBY_VERSION 3.1.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bison \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - readline-dev \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.1/bookworm/Dockerfile b/3.1/bookworm/Dockerfile deleted file mode 100644 index 3211192..0000000 --- a/3.1/bookworm/Dockerfile +++ /dev/null @@ -1,98 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bookworm - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/05/29/ruby-3-1-6-released/ -ENV RUBY_VERSION 3.1.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.1/bullseye/Dockerfile b/3.1/bullseye/Dockerfile deleted file mode 100644 index 245e907..0000000 --- a/3.1/bullseye/Dockerfile +++ /dev/null @@ -1,98 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/05/29/ruby-3-1-6-released/ -ENV RUBY_VERSION 3.1.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.1/slim-bookworm/Dockerfile b/3.1/slim-bookworm/Dockerfile deleted file mode 100644 index 6d83ac0..0000000 --- a/3.1/slim-bookworm/Dockerfile +++ /dev/null @@ -1,125 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bookworm-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/05/29/ruby-3-1-6-released/ -ENV RUBY_VERSION 3.1.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libreadline-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.1/slim-bullseye/Dockerfile b/3.1/slim-bullseye/Dockerfile deleted file mode 100644 index 22a77ef..0000000 --- a/3.1/slim-bullseye/Dockerfile +++ /dev/null @@ -1,125 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bullseye-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/05/29/ruby-3-1-6-released/ -ENV RUBY_VERSION 3.1.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libreadline-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.2/alpine3.20/Dockerfile b/3.2/alpine3.20/Dockerfile deleted file mode 100644 index 0c31f8f..0000000 --- a/3.2/alpine3.20/Dockerfile +++ /dev/null @@ -1,165 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.20 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/ -ENV RUBY_VERSION 3.2.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bison \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - readline-dev \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - rustArch=; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; \ - 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.2/alpine3.21/Dockerfile b/3.2/alpine3.21/Dockerfile deleted file mode 100644 index baf8908..0000000 --- a/3.2/alpine3.21/Dockerfile +++ /dev/null @@ -1,165 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.21 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/ -ENV RUBY_VERSION 3.2.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bison \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - readline-dev \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - rustArch=; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; \ - 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.2/bookworm/Dockerfile b/3.2/bookworm/Dockerfile deleted file mode 100644 index a4b7dbc..0000000 --- a/3.2/bookworm/Dockerfile +++ /dev/null @@ -1,122 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bookworm - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/ -ENV RUBY_VERSION 3.2.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.2/bullseye/Dockerfile b/3.2/bullseye/Dockerfile deleted file mode 100644 index 6bc60d2..0000000 --- a/3.2/bullseye/Dockerfile +++ /dev/null @@ -1,122 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/ -ENV RUBY_VERSION 3.2.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.2/slim-bookworm/Dockerfile b/3.2/slim-bookworm/Dockerfile deleted file mode 100644 index 4d9a904..0000000 --- a/3.2/slim-bookworm/Dockerfile +++ /dev/null @@ -1,149 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bookworm-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/ -ENV RUBY_VERSION 3.2.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libreadline-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.2/slim-bullseye/Dockerfile b/3.2/slim-bullseye/Dockerfile deleted file mode 100644 index d1e1b7f..0000000 --- a/3.2/slim-bullseye/Dockerfile +++ /dev/null @@ -1,149 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bullseye-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/ -ENV RUBY_VERSION 3.2.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libreadline-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.3/alpine3.20/Dockerfile b/3.3/alpine3.20/Dockerfile deleted file mode 100644 index 8eae154..0000000 --- a/3.3/alpine3.20/Dockerfile +++ /dev/null @@ -1,163 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.20 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/11/05/ruby-3-3-6-released/ -ENV RUBY_VERSION 3.3.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - rustArch=; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; \ - 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.3/alpine3.21/Dockerfile b/3.3/alpine3.21/Dockerfile deleted file mode 100644 index f09af22..0000000 --- a/3.3/alpine3.21/Dockerfile +++ /dev/null @@ -1,163 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.21 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/11/05/ruby-3-3-6-released/ -ENV RUBY_VERSION 3.3.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - rustArch=; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; \ - 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.3/bookworm/Dockerfile b/3.3/bookworm/Dockerfile deleted file mode 100644 index 5b2e811..0000000 --- a/3.3/bookworm/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bookworm - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/11/05/ruby-3-3-6-released/ -ENV RUBY_VERSION 3.3.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.3/bullseye/Dockerfile b/3.3/bullseye/Dockerfile deleted file mode 100644 index 2dba313..0000000 --- a/3.3/bullseye/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/11/05/ruby-3-3-6-released/ -ENV RUBY_VERSION 3.3.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.3/slim-bookworm/Dockerfile b/3.3/slim-bookworm/Dockerfile deleted file mode 100644 index 8ad3904..0000000 --- a/3.3/slim-bookworm/Dockerfile +++ /dev/null @@ -1,147 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bookworm-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/11/05/ruby-3-3-6-released/ -ENV RUBY_VERSION 3.3.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.3/slim-bullseye/Dockerfile b/3.3/slim-bullseye/Dockerfile deleted file mode 100644 index 7215268..0000000 --- a/3.3/slim-bullseye/Dockerfile +++ /dev/null @@ -1,147 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bullseye-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/11/05/ruby-3-3-6-released/ -ENV RUBY_VERSION 3.3.6 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz -ENV RUBY_DOWNLOAD_SHA256 540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.4-rc/alpine3.20/Dockerfile b/3.4-rc/alpine3.20/Dockerfile deleted file mode 100644 index 383677e..0000000 --- a/3.4-rc/alpine3.20/Dockerfile +++ /dev/null @@ -1,163 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.20 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ -ENV RUBY_VERSION 3.4.0-preview2 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz -ENV RUBY_DOWNLOAD_SHA256 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - rustArch=; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; \ - 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.4-rc/alpine3.21/Dockerfile b/3.4-rc/alpine3.21/Dockerfile deleted file mode 100644 index 07c7820..0000000 --- a/3.4-rc/alpine3.21/Dockerfile +++ /dev/null @@ -1,163 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.21 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ -ENV RUBY_VERSION 3.4.0-preview2 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz -ENV RUBY_DOWNLOAD_SHA256 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - rustArch=; \ - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; \ - 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.4-rc/bookworm/Dockerfile b/3.4-rc/bookworm/Dockerfile deleted file mode 100644 index 2b05b59..0000000 --- a/3.4-rc/bookworm/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bookworm - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ -ENV RUBY_VERSION 3.4.0-preview2 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz -ENV RUBY_DOWNLOAD_SHA256 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.4-rc/bullseye/Dockerfile b/3.4-rc/bullseye/Dockerfile deleted file mode 100644 index 77f24fe..0000000 --- a/3.4-rc/bullseye/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ -ENV RUBY_VERSION 3.4.0-preview2 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz -ENV RUBY_DOWNLOAD_SHA256 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.4-rc/slim-bookworm/Dockerfile b/3.4-rc/slim-bookworm/Dockerfile deleted file mode 100644 index b1244cd..0000000 --- a/3.4-rc/slim-bookworm/Dockerfile +++ /dev/null @@ -1,147 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bookworm-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ -ENV RUBY_VERSION 3.4.0-preview2 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz -ENV RUBY_DOWNLOAD_SHA256 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.4-rc/slim-bullseye/Dockerfile b/3.4-rc/slim-bullseye/Dockerfile deleted file mode 100644 index 67435a9..0000000 --- a/3.4-rc/slim-bullseye/Dockerfile +++ /dev/null @@ -1,147 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bullseye-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/ -ENV RUBY_VERSION 3.4.0-preview2 -ENV RUBY_DOWNLOAD_URL https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz -ENV RUBY_DOWNLOAD_SHA256 626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7 - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - rustArch=; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; \ - 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; \ - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ - \ - wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ${rustArch:+--enable-yjit} \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - rm -rf /tmp/rust; \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/Dockerfile.template b/Dockerfile.template deleted file mode 100644 index 0eccb01..0000000 --- a/Dockerfile.template +++ /dev/null @@ -1,296 +0,0 @@ -{{ - def is_alpine: - env.variant | startswith("alpine") - ; - def is_slim: - env.variant | startswith("slim-") --}} -{{ if is_alpine then ( -}} -FROM alpine:{{ env.variant | ltrimstr("alpine") }} -{{ ) elif is_slim then ( -}} -FROM debian:{{ env.variant | ltrimstr("slim-") }}-slim -{{ ) else ( -}} -FROM buildpack-deps:{{ env.variant }} -{{ ) end -}} - -{{ if is_alpine then ( -}} -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -{{ ) elif is_slim then ( -}} -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -{{ ) else "" end -}} -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/{{ .post | ltrimstr("/") }} -ENV RUBY_VERSION {{ .version }} -ENV RUBY_DOWNLOAD_URL {{ .url.xz }} -ENV RUBY_DOWNLOAD_SHA256 {{ .sha256.xz }} - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN --mount=type=bind,source=ruby.tar.xz,target=ruby.tar.xz \ - set -eux; \ - \ -{{ if is_alpine then ( -}} - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ -{{ if env.version | rtrimstr("-rc") | IN("3.1", "3.2") then ( -}} -{{ # https://github.com/docker-library/ruby/pull/438 -}} - bison \ -{{ ) else "" end -}} - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ -{{ if env.version | rtrimstr("-rc") | IN("3.1", "3.2") then ( -}} - readline-dev \ -{{ ) else "" end -}} - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ -{{ ) else ( -}} - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ -{{ if env.version | rtrimstr("-rc") | IN("3.1", "3.2") then ( -}} -{{ # https://github.com/docker-library/ruby/pull/438 -}} - bison \ -{{ ) else "" end -}} - dpkg-dev \ - libgdbm-dev \ - ruby \ -{{ if is_slim then ( -}} - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ -{{ if env.version | rtrimstr("-rc") | IN("3.1", "3.2") then ( -}} - libreadline-dev \ -{{ ) else "" end -}} - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ -{{ ) else "" end -}} - ; \ - rm -rf /var/lib/apt/lists/*; \ -{{ ) end -}} -{{ if .rust.version then ( -}} - \ - rustArch=; \ -{{ def archVar: if is_alpine then "apkArch" else "dpkgArch" end -}} - {{ archVar }}="$({{ if is_alpine then "apk --print-arch" else "dpkg --print-architecture" end }})"; \ - case "${{ archVar }}" in \ -{{ - ( - .rustup.arches - | (if is_alpine then "musl" else "glibc" end) as $libcKey - | to_entries - | map( - .key as $bashbrewArch - | ( - if is_alpine then - { - amd64: "x86_64", - arm32v6: "armhf", - arm32v7: "armv7", - arm64v8: "aarch64", - i386: "x86", - ppc64le: "ppc64le", - riscv64: "riscv64", - s390x: "s390x", - } - else - { - amd64: "amd64", - arm32v5: "armel", - arm32v7: "armhf", - arm64v8: "arm64", - i386: "i386", - mips64le: "mips64el", - ppc64le: "ppc64el", - riscv64: "riscv64", - s390x: "s390x", - } - end - )[$bashbrewArch] as $distroArch - | select($distroArch) - | .value - | select(has($libcKey)) - | .[$libcKey] - | ( --}} - {{ $distroArch | @sh }}) rustArch={{ .arch | @sh }}; rustupUrl={{ .url | @sh }}; rustupSha256={{ .sha256 | @sh }} ;; \ -{{ - ) - ) - | join("") - ) --}} - esac; \ - \ - if [ -n "$rustArch" ]; then \ - mkdir -p /tmp/rust; \ - \ - wget -O /tmp/rust/rustup-init "$rustupUrl"; \ - echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; \ - chmod +x /tmp/rust/rustup-init; \ - \ - export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; \ - export PATH="$CARGO_HOME/bin:$PATH"; \ - /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain {{ .rust.version | @sh }} --default-host "$rustArch"; \ - \ - rustc --version; \ - cargo --version; \ - fi; \ -{{ ) else "" end -}} - \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - \ - cd /usr/src/ruby; \ - \ -{{ if is_alpine then ( -}} -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://raw.githubusercontent.com/docker-ruby-nightly/ruby/master/thread-stack-fix.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -{{ ) else "" end -}} -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ -{{ if .rust.version then ( -}} - ${rustArch:+--enable-yjit} \ -{{ ) else "" end -}} - ; \ - make -j "$(nproc)"; \ - make install; \ - \ -{{ if .rust.version then ( -}} - rm -rf /tmp/rust; \ -{{ ) else "" end -}} -{{ if is_alpine then ( -}} - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ -{{ ) else ( -}} - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | 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; \ -{{ ) end -}} - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed -{{ if is_alpine then ( -}} - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ -{{ ) else ( -}} - if dpkg -l | grep -i ruby; then exit 1; fi; \ -{{ ) end -}} - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# 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 -RUN set -eux; \ - mkdir "$GEM_HOME"; \ -# adjust permissions of GEM_HOME for running "gem install" as an arbitrary user - chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/Dockerfile.template.patch b/Dockerfile.template.patch new file mode 100644 index 0000000..fd3adb9 --- /dev/null +++ b/Dockerfile.template.patch @@ -0,0 +1,36 @@ +diff --git a/Dockerfile.template b/Dockerfile.template +index 3c17e98..d19d92e 100644 +--- a/Dockerfile.template ++++ b/Dockerfile.template +@@ -55,7 +55,8 @@ ENV RUBY_DOWNLOAD_SHA256 {{ .sha256.xz }} + + # some of ruby's build scripts are written in ruby + # we purge system ruby later to make sure our final image uses what we just built +-RUN set -eux; \ ++RUN --mount=type=bind,source=ruby.tar.xz,target=ruby.tar.xz \ ++ set -eux; \ + \ + {{ if is_alpine then ( -}} + apk add --no-cache --virtual .ruby-builddeps \ +@@ -194,12 +195,10 @@ RUN set -eux; \ + fi; \ + {{ ) else "" end -}} + \ +- wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ + echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ + \ + mkdir -p /usr/src/ruby; \ + tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ +- rm ruby.tar.xz; \ + \ + cd /usr/src/ruby; \ + \ +@@ -207,7 +206,7 @@ RUN set -eux; \ + # https://github.com/docker-library/ruby/issues/196 + # https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) + # https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) +- wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ ++ wget -O 'thread-stack-fix.patch' 'https://raw.githubusercontent.com/docker-ruby-nightly/ruby/master/thread-stack-fix.patch'; \ + echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ + patch -p1 -i thread-stack-fix.patch; \ + rm thread-stack-fix.patch; \ diff --git a/LICENSE b/LICENSE index fbb6223..006368a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2014 Docker, Inc. All rights reserved. +Copyright (C) 2024 Earlopain All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/README.md b/README.md index 92e5705..3255961 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Last successful build](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2Fdocker-ruby-nightly%2Fruby%2Factions%2Fworkflows%2Fnightly.yml%2Fruns%3Fstatus%3Dsuccess%26event%3Dschedule&query=%24.workflow_runs%5B0%5D%5B'updated_at'%5D&logo=githubactions&label=Last%20successful%20build) ![Last build status](https://github.com/docker-ruby-nightly/ruby/actions/workflows/nightly.yml/badge.svg) -Fork of https://github.com/docker-library/ruby to build daily nightly images. +Builds from https://github.com/docker-library/ruby for daily nightly images. The available variants will mirror the ones from the official images. The tags are structured in the following way: * `alpine3.20-nightly-2024-05-27` diff --git a/apply-templates.sh b/apply-templates.sh deleted file mode 100755 index 9ed389b..0000000 --- a/apply-templates.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -[ -f versions.json ] # run "versions.sh" first - -jqt='.jq-template.awk' -if [ -n "${BASHBREW_SCRIPTS:-}" ]; then - jqt="$BASHBREW_SCRIPTS/jq-template.awk" -elif [ "$BASH_SOURCE" -nt "$jqt" ]; then - # https://github.com/docker-library/bashbrew/blob/master/scripts/jq-template.awk - wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/9f6a35772ac863a0241f147c820354e4008edf38/scripts/jq-template.awk' -fi - -if [ "$#" -eq 0 ]; then - versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)" - eval "set -- $versions" -fi - -generated_warning() { - cat <<-EOH - # - # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" - # - # PLEASE DO NOT EDIT IT DIRECTLY. - # - - EOH -} - -for version; do - export version - - rm -rf "$version/" - - if jq -e '.[env.version] | not' versions.json > /dev/null; then - echo "deleting $version ..." - continue - fi - - variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)" - eval "variants=( $variants )" - - for variant in "${variants[@]}"; do - export variant - - dir="$version/$variant" - mkdir -p "$dir" - - echo "processing $dir ..." - - { - generated_warning - gawk -f "$jqt" Dockerfile.template - } > "$dir/Dockerfile" - done -done diff --git a/docker-ruby b/docker-ruby new file mode 160000 index 0000000..4ea77c4 --- /dev/null +++ b/docker-ruby @@ -0,0 +1 @@ +Subproject commit 4ea77c4694f77035c476c28416e3beb2b80f74a0 diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh deleted file mode 100755 index 88621d9..0000000 --- a/generate-stackbrew-library.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -self="$(basename "$BASH_SOURCE")" -cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" - -if [ "$#" -eq 0 ]; then - versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)" - eval "set -- $versions" -fi - -# sort version numbers with highest first -IFS=$'\n'; set -- $(sort -rV <<<"$*"); unset IFS - -# get the most recent commit which modified any of "$@" -fileCommit() { - git log -1 --format='format:%H' HEAD -- "$@" -} - -# get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" -dirCommit() { - local dir="$1"; shift - ( - cd "$dir" - files="$( - git show HEAD:./Dockerfile | awk ' - toupper($1) == "COPY" { - for (i = 2; i < NF; i++) { - if ($i ~ /^--from=/) { - next - } - print $i - } - } - ' - )" - fileCommit Dockerfile $files - ) -} - -getArches() { - local repo="$1"; shift - local officialImagesBase="${BASHBREW_LIBRARY:-https://github.com/docker-library/official-images/raw/HEAD/library}/" - - local parentRepoToArchesStr - parentRepoToArchesStr="$( - find -name 'Dockerfile' -exec awk -v officialImagesBase="$officialImagesBase" ' - toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { - printf "%s%s\n", officialImagesBase, $2 - } - ' '{}' + \ - | sort -u \ - | xargs -r bashbrew cat --format '["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"' - )" - eval "declare -g -A parentRepoToArches=( $parentRepoToArchesStr )" -} -getArches 'ruby' - -cat <<-EOH -# this file is generated via https://github.com/docker-library/ruby/blob/$(fileCommit "$self")/$self - -Maintainers: Tianon Gravi (@tianon), - Joseph Ferguson (@yosifkit) -GitRepo: https://github.com/docker-library/ruby.git -EOH - -# prints "$2$1$3$1...$N" -join() { - local sep="$1"; shift - local out; printf -v out "${sep//%/%%}%s" "$@" - echo "${out#$sep}" -} - -declare -A latest=( - #[3]='3.2' - #[latest]='3.2' -) - -for version; do - export version - - if ! fullVersion="$(jq -er '.[env.version] | if . then .version else empty end' versions.json)"; then - continue - fi - - variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)" - eval "variants=( $variants )" - - versionAliases=( - $fullVersion - $version - ) - - if [ "$version" = "${version%-rc}" ]; then - for a in "${version%%.*}" latest; do # "3", "latest" - if [ -z "${latest[$a]:-}" ]; then - latest[$a]="$version" - versionAliases+=( "$a" ) - fi - done - fi - - defaultDebianVariant="$(jq -r ' - .[env.version].variants - | map(select( - startswith("alpine") - or startswith("slim-") - | not - )) - | .[0] - ' versions.json)" - defaultAlpineVariant="$(jq -r ' - .[env.version].variants - | map(select( - startswith("alpine") - )) - | .[0] - ' versions.json)" - - for v in "${variants[@]}"; do - dir="$version/$v" - [ -f "$dir/Dockerfile" ] || continue - variant="$(basename "$v")" - - commit="$(dirCommit "$dir")" - - variantAliases=( "${versionAliases[@]/%/-$variant}" ) - case "$variant" in - "$defaultDebianVariant") - variantAliases+=( "${versionAliases[@]}" ) - ;; - *-"$defaultDebianVariant") - variantAliases+=( "${versionAliases[@]/%/-${variant%-$defaultDebianVariant}}" ) - ;; - "$defaultAlpineVariant") - variantAliases+=( "${versionAliases[@]/%/-alpine}" ) - ;; - esac - variantAliases=( "${variantAliases[@]//latest-/}" ) - - variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")" - variantArches="${parentRepoToArches[$variantParent]}" - - echo - cat <<-EOE - Tags: $(join ', ' "${variantAliases[@]}") - Architectures: $(join ', ' $variantArches) - GitCommit: $commit - Directory: $dir - EOE - done -done diff --git a/images.rb b/images.rb index 1437c1e..3e4d142 100755 --- a/images.rb +++ b/images.rb @@ -2,7 +2,7 @@ require "json" -json = JSON.parse(File.read("versions.json")) +json = JSON.parse(File.read("docker-ruby/versions.json")) latest_release = json.compact.keys.max_by(&:to_f) variants = json[latest_release]["variants"] @@ -17,7 +17,7 @@ # ] images = variants.map do |variant| # debian:bullseye-slim - base_image = File.read("master/#{variant}/Dockerfile")[/FROM (.*)/, 1] + base_image = File.read("docker-ruby/master/#{variant}/Dockerfile")[/FROM (.*)/, 1] manifest_inspect = JSON.parse(`docker manifest inspect #{base_image}`) # ["linux/amd64", "linux/arm64/v8", "linux/386"] diff --git a/nightly-versions.rb b/nightly-versions.rb index c45aed6..850bc66 100755 --- a/nightly-versions.rb +++ b/nightly-versions.rb @@ -3,7 +3,7 @@ require "json" require "net/http" -current_json = JSON.parse(File.read("versions.json")) +current_json = JSON.parse(File.read("docker-ruby/versions.json")) latest_release = current_json.compact.keys.max_by(&:to_f) donor = current_json[latest_release] @@ -23,4 +23,4 @@ # For step output puts result # For apply-templates.sh -File.write("versions.json", result) +File.write("docker-ruby/versions.json", result) diff --git a/rust.json b/rust.json deleted file mode 100644 index d95ed80..0000000 --- a/rust.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "rust": { - "version": "1.74.1" - }, - "rustup": { - "arches": { - "amd64": { - "glibc": { - "arch": "x86_64-unknown-linux-gnu", - "sha256": "0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "x86_64-unknown-linux-musl", - "sha256": "7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init" - } - }, - "arm32v5": { - "glibc": { - "arch": "arm-unknown-linux-gnueabi", - "sha256": "1fca5ad0f877f65c76f07bb0cbbe22c28b6e4ba883bf057f1a05636e8e2a4b40", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/arm-unknown-linux-gnueabi/rustup-init" - } - }, - "arm32v6": { - "glibc": { - "arch": "arm-unknown-linux-gnueabihf", - "sha256": "8f7801e93ec2c80e0253cba0e25c1085f92e8f49c7ddf9930be62d13361bd808", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/arm-unknown-linux-gnueabihf/rustup-init" - } - }, - "arm32v7": { - "glibc": { - "arch": "armv7-unknown-linux-gnueabihf", - "sha256": "f21c44b01678c645d8fbba1e55e4180a01ac5af2d38bcbd14aa665e0d96ed69a", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/armv7-unknown-linux-gnueabihf/rustup-init" - } - }, - "arm64v8": { - "glibc": { - "arch": "aarch64-unknown-linux-gnu", - "sha256": "673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "aarch64-unknown-linux-musl", - "sha256": "b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init" - } - }, - "i386": { - "glibc": { - "arch": "i686-unknown-linux-gnu", - "sha256": "e7b0f47557c1afcd86939b118cbcf7fb95a5d1d917bdd355157b63ca00fc4333", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/i686-unknown-linux-gnu/rustup-init" - } - }, - "mips64le": { - "glibc": { - "arch": "mips64el-unknown-linux-gnuabi64", - "sha256": "b8a30dd0d0ba34324c5b2399e76ba44e50a036439cb66c92aef62b485fdc97c8", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/mips64el-unknown-linux-gnuabi64/rustup-init" - } - }, - "ppc64le": { - "glibc": { - "arch": "powerpc64le-unknown-linux-gnu", - "sha256": "1032934fb154ad2d365e02dcf770c6ecfaec6ab2987204c618c21ba841c97b44", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/powerpc64le-unknown-linux-gnu/rustup-init" - } - }, - "s390x": { - "glibc": { - "arch": "s390x-unknown-linux-gnu", - "sha256": "414210ffd294a39ee5963e05d9f5a8435945657a1ddf74b14fd63f6eb898d69e", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/s390x-unknown-linux-gnu/rustup-init" - } - } - }, - "version": "1.26.0" - } -} diff --git a/rust.sh b/rust.sh deleted file mode 100755 index f26615b..0000000 --- a/rust.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -rustupVersion="$(curl -fsSL 'https://static.rust-lang.org/rustup/release-stable.toml')" -rustupVersion="$(awk <<<"$rustupVersion" -F "[ ='\"]+" '$1 == "version" { print $2; exit }')" -[ -n "$rustupVersion" ] -export rustupVersion -echo "rustup: $rustupVersion" - -json="$(jq -nc ' - { - rustup: { - version: env.rustupVersion, - arches: ( - [ - # https://github.com/rust-lang/rustup/blob/1.25.1/doc/src/installation/other.md - # (filtering out windows, darwin, bsd, illumos, android, etc - just linux gnu and musl) - "aarch64-unknown-linux-gnu", - "aarch64-unknown-linux-musl", - "arm-unknown-linux-gnueabi", - "arm-unknown-linux-gnueabihf", - "armv7-unknown-linux-gnueabihf", - "i686-unknown-linux-gnu", - "mips-unknown-linux-gnu", - "mips64-unknown-linux-gnuabi64", - "mips64el-unknown-linux-gnuabi64", - "mipsel-unknown-linux-gnu", - "powerpc-unknown-linux-gnu", - "powerpc64-unknown-linux-gnu", - "powerpc64le-unknown-linux-gnu", - "s390x-unknown-linux-gnu", - "x86_64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - # TODO find a good source for scraping these instead of hard-coding them - empty # trailing comma - ] - | map( - split("-") as $split - | $split[0] as $arch - | $split[-1] as $libc - | { - "aarch64": "arm64v8", - "arm": ("arm32v" + if ($libc | endswith("hf")) then "6" else "5" end), - "armv7": "arm32v7", - "i686": "i386", - "mips64el": "mips64le", - "powerpc64le": "ppc64le", - "s390x": "s390x", - "x86_64": "amd64", - # TODO windows? (we do not compile on/for Windows right now) - }[$arch] as $bashbrewArch - | select($bashbrewArch) - | { - ($bashbrewArch): { - (if $libc == "musl" then "musl" else "glibc" end): ({ - "arch": ., - "url": "https://static.rust-lang.org/rustup/archive/\(env.rustupVersion)/\(.)/rustup-init", - } | .sha256 = .url + ".sha256"), - }, - } - ) - | reduce .[] as $map ({}; . * $map) - ), - }, - } -')" - -urls="$(jq <<<"$json" -r '[ .. | .sha256? | select(. and startswith("http")) | @sh ] | join(" ")')" -eval "urls=( $urls )" -for url in "${urls[@]}"; do - sha256="$(curl -fsSL "$url")" - sha256="${sha256%% *}" - [ -n "$sha256" ] - export url sha256 - json="$(jq <<<"$json" -c 'walk(if . == env.url then env.sha256 else . end)')" -done - -# TODO https://static.rust-lang.org/dist/channel-rust-1.66.toml -> scrape stable to know which version is stable but we can scrape other minors to get the latest patch if we needed an older one for some reason (like an older version of Ruby needing an older Rust or a newer Rust no longer working on our older distros, etc) - -rustVersion="$(curl -fsSL 'https://static.rust-lang.org/dist/channel-rust-stable.toml' | grep -E '^(\[|(version|(xz_)?(url|hash|available))[[:space:]]*=)')" -rustVersion="$(awk <<<"$rustVersion" -F "[ ='\"]+" ' - /^\[/ { pkg = $0; next } - pkg == "[pkg.rust]" && $1 == "version" { print $2; exit } -')" -[ -n "$rustVersion" ] -export rustVersion -echo "rust: $rustVersion" -# TODO also scrape available "[pkg.rust.target.*-linux-*]" so we can cross-reference available target arches with rustup - -json="$(jq <<<"$json" -c '.rust = { version: env.rustVersion }')" - -jq <<<"$json" -S . > rust.json diff --git a/update.sh b/update.sh deleted file mode 100755 index bac2d75..0000000 --- a/update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" - -./versions.sh "$@" -./apply-templates.sh "$@" diff --git a/variants.rb b/variants.rb index a96fa2d..4220bc2 100755 --- a/variants.rb +++ b/variants.rb @@ -2,6 +2,6 @@ require "json" -json = JSON.parse(File.read("versions.json")) +json = JSON.parse(File.read("docker-ruby/versions.json")) latest_release = json.compact.keys.max_by(&:to_f) puts json[latest_release]["variants"].to_json diff --git a/versions.json b/versions.json deleted file mode 100644 index e614243..0000000 --- a/versions.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "3.1": { - "version": "3.1.6", - "date": "2024-05-29", - "post": "/en/news/2024/05/29/ruby-3-1-6-released/", - "url": { - "gz": "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz", - "xz": "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.xz", - "zip": "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.zip" - }, - "size": { - "gz": 20887803, - "xz": 15273916, - "zip": 25211787 - }, - "sha1": { - "gz": "02832465f9b0f68b9fe2c443f9f602d6e840b2ca", - "xz": "2671606a00d0ad564fb93f92d093590563c4e25b", - "zip": "534e675022dc30c3674ee68a7b2fbe9300d64367" - }, - "sha256": { - "gz": "0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22", - "xz": "597bd1849f252d8a6863cb5d38014ac54152b508c36dca156f6356a9e63c6102", - "zip": "c21d16e7953d65d05824834e89d7e1a58ccf2bc018fe966f785774ea383f53db" - }, - "sha512": { - "gz": "624555ab3681bd6663bca7cf3529a969b9f0f16928559cfb713c57f763506c8740410c9b460d946922994859189ef2b9956167bd31423cf2e3acbf5a30086fe1", - "xz": "a3159648706d6d11ce9613201141e884b3accc69bf928c756de8a8f2b71d219886e91435d30cf2c30e85af31f87801138e10106344766100f1b80662c7244652", - "zip": "f8b5a0fda8dc0248f29796a0b5b67f93a825a013b92b0db437ecf0a5ffaf06a800285999a0e9a61e890a8000dd2e2c081a6ecb5dae62b1045761a13fd87c397b" - }, - "variants": [ - "bookworm", - "slim-bookworm", - "bullseye", - "slim-bullseye", - "alpine3.21", - "alpine3.20" - ] - }, - "3.2": { - "version": "3.2.6", - "date": "2024-10-30", - "post": "/en/news/2024/10/30/ruby-3-2-6-released/", - "url": { - "gz": "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.gz", - "zip": "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.zip", - "xz": "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.6.tar.xz" - }, - "size": { - "gz": 20521981, - "zip": 24653808, - "xz": 15126888 - }, - "sha1": { - "gz": "bbf265f5e7a3f480056dc2fa6d600a97cba00713", - "zip": "efbcfc2c2e238a7201366fdefdcf0dc16e4072af", - "xz": "eabbe230df704e7141d53d8221314bb33b5f0dea" - }, - "sha256": { - "gz": "d9cb65ecdf3f18669639f2638b63379ed6fbb17d93ae4e726d4eb2bf68a48370", - "zip": "36ca2292b48d8f6a0281d6c772dc47c358cb838774addc0344e38d4d2735704f", - "xz": "671134022238c2c4a9d79dc7d1e58c909634197617901d25863642f735a27ecb" - }, - "sha512": { - "gz": "26ae9439043cf40e5eddde6b92ae51c9e1fa4e89c8ec6da36732c59c14873b022c683fb3007950d372f35de9b62a4fabbbc3ef1f4ef58cd53058bd56e1552cbe", - "zip": "8474829ebe13b3357f962571e8114e47634b5ed1f3e2dbfdf4ecb2ece1a3ed354f3506e8526a6768457e980ea4f056d77cd5b547419f2d8f9bea07348f64edc2", - "xz": "78f7fc76d47c772b9bc313cbcb57a2c0f1a975e09cfe46a3083f6f603d62b0031bd4c55896c8353c1c343974d45077e06e310111198d870883e06a0cf6fd03ce" - }, - "variants": [ - "bookworm", - "slim-bookworm", - "bullseye", - "slim-bullseye", - "alpine3.21", - "alpine3.20" - ], - "rust": { - "version": "1.74.1" - }, - "rustup": { - "arches": { - "amd64": { - "glibc": { - "arch": "x86_64-unknown-linux-gnu", - "sha256": "0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "x86_64-unknown-linux-musl", - "sha256": "7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init" - } - }, - "arm64v8": { - "glibc": { - "arch": "aarch64-unknown-linux-gnu", - "sha256": "673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "aarch64-unknown-linux-musl", - "sha256": "b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init" - } - } - }, - "version": "1.26.0" - } - }, - "3.3": { - "version": "3.3.6", - "date": "2024-11-05", - "post": "/en/news/2024/11/05/ruby-3-3-6-released/", - "url": { - "gz": "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.gz", - "zip": "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.zip", - "xz": "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.xz" - }, - "size": { - "gz": 22153657, - "zip": 27048656, - "xz": 16398228 - }, - "sha1": { - "gz": "0106171cd1801fb5663e8e709f3d6c935d683c9b", - "zip": "88239456249cd80cadd1cbf98a317ae700ccd9df", - "xz": "25391e9bd8547cd07e09afcfc472777520a3178a" - }, - "sha256": { - "gz": "8dc48fffaf270f86f1019053f28e51e4da4cce32a36760a0603a9aee67d7fd8d", - "zip": "a60240a6f9bcc8db6c07d40ad29c7dceb21430debe3ebc39bf339207818132f6", - "xz": "540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266" - }, - "sha512": { - "gz": "4ae22f5c2a1f7ed84aab7587ff04ce4d9933cffe4347deaef0ab88d22c9780f274c1664a4ee1dd8235bc3cc749be828ffa8db7cb5f5002339a59a599acf3c729", - "zip": "c010c7d3e2b373b41a18bcadfb6dba276afabe479d75624569b5bdc605f3575bced2aff511708e25ceca43c7c918400222329e55e599c54154f203957f119ad2", - "xz": "c4b86188bf539fa737932e1ba5b746bc295e7c43b2f8cca2668eb7c88aa7228e2ce9032bbcd244a7d558a11bc842445b5fbeac3503ca7d223b63c53e08dba4ab" - }, - "variants": [ - "bookworm", - "slim-bookworm", - "bullseye", - "slim-bullseye", - "alpine3.21", - "alpine3.20" - ], - "rust": { - "version": "1.74.1" - }, - "rustup": { - "arches": { - "amd64": { - "glibc": { - "arch": "x86_64-unknown-linux-gnu", - "sha256": "0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "x86_64-unknown-linux-musl", - "sha256": "7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init" - } - }, - "arm64v8": { - "glibc": { - "arch": "aarch64-unknown-linux-gnu", - "sha256": "673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "aarch64-unknown-linux-musl", - "sha256": "b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init" - } - } - }, - "version": "1.26.0" - } - }, - "3.4": null, - "3.4-rc": { - "version": "3.4.0-preview2", - "date": "2024-10-07", - "post": "/en/news/2024/10/07/ruby-3-4-0-preview2-released/", - "tag": "v3_4_0_preview2", - "stats": { - "files_changed": 4422, - "insertions": 163889, - "deletions": 243380 - }, - "url": { - "gz": "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.gz", - "zip": "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.zip", - "xz": "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-preview2.tar.xz" - }, - "size": { - "gz": 22722332, - "zip": 28101194, - "xz": 16878876 - }, - "sha1": { - "gz": "c23265acf6c07b4c1df1e41eebf8b4cf2f25b97b", - "zip": "479bd223bca3225fb3a15984e3eae4efb9a40189", - "xz": "dbff404b969012702dc500cac72f4d6b3822068e" - }, - "sha256": { - "gz": "443cd7ec54ade4786bc974ce9f5d49f172a60f8edc84b597b7fe2bd2a94b8371", - "zip": "e00a6fbf6f9e25a725711a8aac7e38be6bed61de4db9862a405172b96bf38b5b", - "xz": "626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7" - }, - "sha512": { - "gz": "0946d256587597bdf13437a50f7a3298c151133edea161a1c4806a04dcbd8c2e8a7fd617f3eda16c5c05f6e6346317562cc30ba67698f1fdd92237c03bdbd23e", - "zip": "0d9ee1c41920e4d594b0f2c40d02339b4e9a2cd5232f5ee914cab5a685cb4a2279fbbfd8fbad40ef0a53866db4e1de96068c62580ede6d8fab02550393bcbe81", - "xz": "f23257896a35d3a581cbf5e8c94fe28e45725e39608a7669f47f31085338b1b4929a4db40d826d8fee628afb97b0c25b2f9e7bda4cd42e80c1208c46caf54265" - }, - "variants": [ - "bookworm", - "slim-bookworm", - "bullseye", - "slim-bullseye", - "alpine3.21", - "alpine3.20" - ], - "rust": { - "version": "1.74.1" - }, - "rustup": { - "arches": { - "amd64": { - "glibc": { - "arch": "x86_64-unknown-linux-gnu", - "sha256": "0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "x86_64-unknown-linux-musl", - "sha256": "7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init" - } - }, - "arm64v8": { - "glibc": { - "arch": "aarch64-unknown-linux-gnu", - "sha256": "673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init" - }, - "musl": { - "arch": "aarch64-unknown-linux-musl", - "sha256": "b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e", - "url": "https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init" - } - } - }, - "version": "1.26.0" - } - } -} diff --git a/versions.sh b/versions.sh deleted file mode 100755 index 64bf090..0000000 --- a/versions.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" - -versions=( "$@" ) -if [ ${#versions[@]} -eq 0 ]; then - versions=( */ ) - json='{}' -else - json="$(< versions.json)" -fi -versions=( "${versions[@]%/}" ) - -yq='./.yq' -# https://github.com/mikefarah/yq/releases -# TODO detect host architecture -yqUrl='https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_amd64' -yqSha256='0d6aaf1cf44a8d18fbc7ed0ef14f735a8df8d2e314c4cc0f0242d35c0a440c95' -if command -v yq &> /dev/null; then - # TODO verify that the "yq" in PATH is https://github.com/mikefarah/yq, not the python-based version you'd get from "apt-get install yq" somehow? maybe they're compatible enough for our needs that it doesn't matter? - yq='yq' -elif [ ! -x "$yq" ] || ! sha256sum <<<"$yqSha256 *$yq" --quiet --strict --check; then - wget -qO "$yq.new" "$yqUrl" - sha256sum <<<"$yqSha256 *$yq.new" --quiet --strict --check - chmod +x "$yq.new" - "$yq.new" --version - mv "$yq.new" "$yq" -fi - -releases="$( - wget -qO- 'https://github.com/ruby/www.ruby-lang.org/raw/master/_data/releases.yml' \ - | "$yq" -r '@json' # this *should* work on both the Go-based "yq" we download and the Python-based "yq" available from Debian's APT repo -)" - -for version in "${versions[@]}"; do - rcGrepV='-v' - rcVersion="${version%-rc}" - if [ "$rcVersion" != "$version" ]; then - rcGrepV= - fi - export version rcVersion - - doc="$(jq <<<"$releases" -c ' - map( - select( - .version - # exact versions ("3.1.0-preview1") should match exactly but "X.Y" or "X.Y-rc" should fuzzy match appropriately - | . == env.version or ( - ( - startswith(env.rcVersion + ".") - or startswith(env.rcVersion + "-") - ) and ( - contains("preview") or contains("rc") - | if env.version == env.rcVersion then not else . end - ) - ) - ) - ) - | first // empty - ')" - - if [ -z "$doc" ]; then - echo >&2 "warning: skipping/removing '$version' (does not appear to exist upstream)" - json="$(jq <<<"$json" -c '.[env.version] = null')" - continue - fi - - fullVersion="$(jq <<<"$doc" -r '.version')" - echo "$version: $fullVersion" - - if [ "$rcVersion" != "$version" ] && gaFullVersion="$(jq <<<"$json" -er '.[env.rcVersion] | if . then .version else empty end')"; then - # Ruby pre-releases have only been for .0 since ~2011, so if our pre-release now has a relevant GA, it should go away 👀 - # just in case, we'll also do a version comparison to make sure we don't have a pre-release that's newer than the relevant GA - latestVersion="$({ echo "$fullVersion"; echo "$gaFullVersion"; } | sort -V | tail -1)" - if [[ "$fullVersion" == "$gaFullVersion"* ]] || [ "$latestVersion" = "$gaFullVersion" ]; then - # "x.y.z-rc1" == x.y.z* - json="$(jq <<<"$json" -c 'del(.[env.version])')" - continue - fi - fi - - doc="$(jq <<<"$doc" -c ' - .variants = [ - ( - "bookworm", - "bullseye", - empty # trailing comma hack - | ., "slim-" + .), # https://github.com/docker-library/ruby/pull/142#issuecomment-320012893 - ( - "3.21", - "3.20", - empty # trailing comma hack - | "alpine" + .) - ] - ')" - - case "$rcVersion" in - 3.1) ;; - *) - # YJIT - doc="$(jq <<<"$doc" -sc ' - .[1][].arches? |= if . then with_entries(select(.key | IN( - # https://github.com/ruby/ruby/blob/v3_2_0/doc/yjit/yjit.md ("currently supported for macOS and Linux on x86-64 and arm64/aarch64 CPUs") - # https://github.com/ruby/ruby/blob/v3_2_0/configure.ac#L3757-L3761 - "amd64", - "arm64v8", - empty # trailing comma - ))) else empty end - | add - ' - rust.json)" - ;; - esac - - json="$(jq <<<"$json" -c --argjson doc "$doc" '.[env.version] = $doc')" - - # make sure pre-release versions have a placeholder for GA - if [ "$version" != "$rcVersion" ]; then - json="$(jq <<<"$json" -c '.[env.rcVersion] //= null')" - fi -done - -jq <<<"$json" 'to_entries | sort_by(.key) | from_entries' > versions.json