From 055758356036ca79d3e655cb6bb52cada498661b Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Sun, 6 Oct 2024 10:28:05 +0200 Subject: [PATCH 01/12] feat: use official Docker image Ubuntu 22.04 - Ubuntu 24.04.1 LTS "Noble" with tag 20240904.1 - asdf-vm version 0.14.1 with updates from: https://github.com/asdf-vm/asdf.git - asdf-vm plugins for: - pipx: https://github.com/yozachar/asdf-pipx.git - python: https://github.com/asdf-community/asdf-python.git - nodejs: https://github.com/asdf-vm/asdf-nodejs.git - rust: https://github.com/code-lever/asdf-rust.git - golang: https://github.com/asdf-community/asdf-golang.git - ruby: https://github.com/asdf-vm/asdf-ruby.git Signed-off-by: Stephan Linz --- CONTRIBUTING.md | 2 +- Dockerfile | 206 +++++++++++++++++++++++++++++++++++++++--------- README.md | 11 ++- 3 files changed, 176 insertions(+), 43 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3280583..f659553 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ docker build -t tiacsys/readourdocs-docker-images:local . ``` This will take quite a long time, mostly due to LaTeX dependencies. The -resulting image will be at least around 12GB. +resulting image will be at least around 17GB. Once your image is built, you can test your image locally by running a shell in a container using your new image: diff --git a/Dockerfile b/Dockerfile index cbea336..d3bf26c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,12 @@ # Read Our Docs - Environment base # -# -- derived from Read The Docs base environment -# -- see: https://hub.docker.com/r/readthedocs/build/tags -# -- see: https://github.com/readthedocs/readthedocs-docker-images -# -# -- derived from Ubuntu official Docker image +# -- derived from official Ubuntu Docker image # -- see: https://hub.docker.com/_/ubuntu/tags # -- see: https://github.com/docker-library/official-images # -FROM readthedocs/build:ubuntu-24.04-2024.06.17 +FROM ubuntu:noble-20240904.1 LABEL mantainer="Stephan Linz " -LABEL version="2024.10.0" +LABEL version="unstable" LABEL org.opencontainers.image.vendor="TiaC Systems Network" LABEL org.opencontainers.image.authors="Stephan Linz " @@ -29,9 +25,52 @@ WORKDIR / # System dependencies RUN apt-get -y update RUN apt-get -y dist-upgrade +RUN apt-get -y install \ + software-properties-common \ + vim +RUN apt-get -y autoremove --purge +RUN apt-get clean + +# Install requirements +RUN apt-get -y install \ + build-essential \ + bzr \ + curl \ + doxygen \ + g++ \ + git-core \ + graphviz-dev \ + libbz2-dev \ + libcairo2-dev \ + libenchant-2-2 \ + libevent-dev \ + libffi-dev \ + libfreetype6 \ + libfreetype6-dev \ + libgraphviz-dev \ + libjpeg8-dev \ + libjpeg-dev \ + liblcms2-dev \ + libmysqlclient-dev \ + libpq-dev \ + libreadline-dev \ + libsqlite3-dev \ + libtiff5-dev \ + libwebp-dev \ + libxml2-dev \ + libxslt1-dev \ + libxslt-dev \ + mercurial \ + pandoc \ + pkg-config \ + postgresql-client \ + subversion \ + zlib1g-dev RUN apt-get -y autoremove --purge RUN apt-get clean +# ############################################################################ + # Localization dependencies RUN apt-get -y install \ locales @@ -52,34 +91,34 @@ RUN locale -a # Tools for international spelling check RUN apt-get -y install \ - aspell \ - enchant-2 \ - hunspell + aspell \ + enchant-2 \ + hunspell RUN apt-get -y autoremove --purge RUN apt-get clean # Dictionaries for spelling check -- split to reduce image layer size RUN apt-get -y install \ - aspell-en \ - hunspell-en-us \ - hunspell-en-med + aspell-en \ + hunspell-en-us \ + hunspell-en-med RUN apt-get -y autoremove --purge RUN apt-get clean # Dictionaries for spelling check -- split to reduce image layer size RUN apt-get -y install \ - aspell-de \ - hunspell-de-de \ - hunspell-de-med \ - myspell-de-de-1901 + aspell-de \ + hunspell-de-de \ + hunspell-de-med \ + myspell-de-de-1901 RUN apt-get -y autoremove --purge RUN apt-get clean # Dictionaries for spelling check -- split to reduce image layer size RUN apt-get -y install \ - wamerican-huge \ - wgerman-medical \ - wngerman + wamerican-huge \ + wgerman-medical \ + wngerman RUN apt-get -y autoremove --purge RUN apt-get clean @@ -106,13 +145,13 @@ RUN apt-get clean # swig: is required for different purposes # https://github.com/readthedocs/readthedocs-docker-images/issues/15 RUN apt-get -y install \ - graphviz \ - imagemagick \ - librsvg2-bin \ - pdf2svg \ - plantuml \ - poppler-utils \ - swig + graphviz \ + imagemagick \ + librsvg2-bin \ + pdf2svg \ + plantuml \ + poppler-utils \ + swig RUN apt-get -y autoremove --purge RUN apt-get clean @@ -120,18 +159,45 @@ RUN apt-get clean # LaTeX -- split to reduce image layer size RUN apt-get -y install \ - texlive-fonts-extra \ + texlive-fonts-extra +RUN apt-get -y install \ texlive-fonts-recommended RUN apt-get -y install \ - texlive-lang-english \ + texlive-lang-english +RUN apt-get -y install \ texlive-lang-european RUN apt-get -y install \ - texlive-pictures \ - texlive-science \ + texlive-lang-japanese +RUN apt-get -y install \ + texlive-pictures +RUN apt-get -y install \ + texlive-science +RUN apt-get -y install \ texlive-xetex +RUN apt-get -y install \ + texlive-full RUN apt-get -y autoremove --purge RUN apt-get clean +# lmodern: extra fonts +# https://github.com/rtfd/readthedocs.org/issues/5494 +# +# xindy: is useful to generate non-ascii indexes +# https://github.com/rtfd/readthedocs.org/issues/4454 +# +# fonts-noto-cjk-extra +# fonts-hanazono: chinese fonts +# https://github.com/readthedocs/readthedocs.org/issues/6319 +RUN apt-get -y install \ + fonts-symbola \ + lmodern \ + latex-cjk-chinese-arphic-bkai00mp \ + latex-cjk-chinese-arphic-gbsn00lp \ + latex-cjk-chinese-arphic-gkai00mp \ + fonts-noto-cjk-extra \ + fonts-hanazono \ + xindy + # latexmk: is needed to generate LaTeX documents # https://github.com/readthedocs/readthedocs.org/issues/4454 RUN apt-get -y install \ @@ -141,10 +207,53 @@ RUN apt-get clean # ############################################################################ -# asdf Python 3.6.15 extra requirements +# asdf Python extra requirements +# https://github.com/pyenv/pyenv/wiki#suggested-build-environment # https://github.com/pyenv/pyenv/issues/1889#issuecomment-833587851 RUN apt-get install -y \ - clang + clang \ + liblzma-dev \ + libncursesw5-dev \ + libssl-dev \ + libxmlsec1-dev \ + llvm \ + make \ + tk-dev \ + wget \ + xz-utils +RUN apt-get -y autoremove --purge +RUN apt-get clean + +# asdf nodejs extra requirements +# https://github.com/asdf-vm/asdf-nodejs#linux-debian +RUN apt-get install -y \ + dirmngr \ + gpg +RUN apt-get -y autoremove --purge +RUN apt-get clean + +# asdf Golang extra requirements +# https://github.com/kennyp/asdf-golang#linux-debian +RUN apt-get install -y \ + coreutils +RUN apt-get -y autoremove --purge +RUN apt-get clean + +# asdf Ruby extra requirements +# https://github.com/rbenv/ruby-build/wiki#suggested-build-environment +RUN apt-get install -y \ + autoconf \ + patch \ + rustc \ + libssl-dev \ + libyaml-dev \ + libreadline6-dev \ + libgmp-dev \ + libncurses5-dev \ + libgdbm6 \ + libgdbm-dev \ + libdb-dev \ + uuid-dev RUN apt-get -y autoremove --purge RUN apt-get clean @@ -186,18 +295,43 @@ RUN apt-get clean # asdf version manager in docs user space. # +# UID and GID from readthedocs/user +RUN groupadd --gid 205 docs +RUN useradd -m --uid 1005 --gid 205 docs + USER docs WORKDIR /home/docs +# Install asdf +RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --depth 1 --branch v0.14.1 +RUN echo ". /home/docs/.asdf/asdf.sh" >> /home/docs/.bashrc +RUN echo ". /home/docs/.asdf/completions/asdf.bash" >> /home/docs/.bashrc + +# Activate asdf in current session +ENV PATH /home/docs/.asdf/shims:/home/docs/.asdf/bin:$PATH + +# Install asdf plugins +RUN asdf plugin add pipx https://github.com/yozachar/asdf-pipx.git +RUN asdf plugin add python https://github.com/asdf-community/asdf-python.git +RUN asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git +RUN asdf plugin add rust https://github.com/code-lever/asdf-rust.git +RUN asdf plugin add golang https://github.com/asdf-community/asdf-golang.git +RUN asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git + +# Create directories for languages installations +RUN mkdir -p /home/docs/.asdf/installs/pipx && \ + mkdir -p /home/docs/.asdf/installs/python && \ + mkdir -p /home/docs/.asdf/installs/nodejs && \ + mkdir -p /home/docs/.asdf/installs/rust && \ + mkdir -p /home/docs/.asdf/installs/golang && \ + mkdir -p /home/docs/.asdf/installs/ruby + # Upgrade asdf version manager # https://github.com/asdf-vm/asdf RUN asdf update RUN asdf plugin update --all RUN asdf version -# Install asdf plugins -RUN asdf plugin add pipx https://github.com/yozachar/asdf-pipx.git - # ############################################################################ # diff --git a/README.md b/README.md index 03a7bdb..3fb563c 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,12 @@ README.md). ## Content -- based on [Docker image definitions used by Read the - Docs](https://github.com/readthedocs/readthedocs-docker-images), - **ubuntu-24.04-2024.06.17** - - Ubuntu 24.04 - - TeX Live 2023 +- based on [Ubuntu official Docker image]( + https://github.com/docker-library/official-images), + **ubuntu:noble-20240904.1** + - Ubuntu 24.04.1 LTS - extend with: - - Ubuntu 24.04 package upgrade + - Ubuntu system package upgrade - locales for English unicode (`en_US.UTF-8`) - locales for German unicode (`de_DE.UTF-8`) - **Python 3.12.3** (`python3`, `pip3`) From 92f12fa806482eb4dd1c7d8f3a85c1113b64bdc0 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Sun, 6 Oct 2024 10:28:46 +0200 Subject: [PATCH 02/12] feat: enable shell completions for PyPA pipx Signed-off-by: Stephan Linz --- Dockerfile | 67 ++++++++++++++++++++++++++++++++---------------------- README.md | 1 + 2 files changed, 41 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3bf26c..d6fa663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -471,33 +471,6 @@ RUN asdf list ruby # ############################################################################ -# -# PyPA pipx for Python runtime version -# https://repology.org/project/pipx/versions -# https://pipx.pypa.io/stable/installation -# https://github.com/pypa/pipx -# - -# Define pipx version to be installed via asdf -ENV ROD_PIPX_VERSION=1.7.1 - -# Install pipx version -RUN asdf install pipx $ROD_PIPX_VERSION && \ - asdf global pipx $ROD_PIPX_VERSION && \ - asdf reshim pipx - -# Adding labels for external usage -LABEL pipx.version=$ROD_PIPX_VERSION - -# Set default pipx version -RUN asdf local pipx $ROD_PIPX_VERSION -RUN asdf list pipx - -# Ensure PATH environment variable for pipx -RUN pipx ensurepath - -# ############################################################################ - # # Python runtime versions # https://www.python.org/downloads @@ -609,6 +582,46 @@ LABEL python.wheel=$ROD_WHEEL_VERSION LABEL python.poetry=$ROD_POETRY_VERSION LABEL python.west=$ROD_WEST_VERSION +# Set default Python version +RUN asdf local python $ROD_PYTHON_VERSION_312 +RUN asdf list python + +# ############################################################################ + +# +# PyPA pipx for Python runtime version +# https://repology.org/project/pipx/versions +# https://pipx.pypa.io/stable/installation +# https://github.com/pypa/pipx +# + +# Define pipx version to be installed via asdf +ENV ROD_PIPX_VERSION=1.7.1 +ENV ROD_PIPX_ARGCOMPLETE_VERSION=3.5.0 + +# Install pipx version +RUN asdf install pipx $ROD_PIPX_VERSION && \ + asdf global pipx $ROD_PIPX_VERSION && \ + asdf reshim pipx + +# Adding labels for external usage +LABEL pipx.version=$ROD_PIPX_VERSION +LABEL pipx_argcomplete.version=$ROD_PIPX_ARGCOMPLETE_VERSION + +# Set default pipx version +RUN asdf local pipx $ROD_PIPX_VERSION +RUN asdf list pipx + +# Ensure PATH environment variable for pipx +RUN pipx ensurepath + +# Enabling shell completions for pipx +RUN pipx install argcomplete==$ROD_PIPX_ARGCOMPLETE_VERSION && \ + pipx pin argcomplete && \ + echo 'eval "$(register-python-argcomplete pipx)"' >> /home/docs/.bashrc + +# ############################################################################ + # Define Python package versions to be installed via pipx ENV ROD_POETRY_VERSION_18=1.8.3 ENV ROD_POETRY_VERSION_17=1.7.1 diff --git a/README.md b/README.md index 3fb563c..f8d6a5c 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ README.md). - `west==1.2.0` - only-binary: `numpy`, `scipy`, `pandas`, `matplotlib` - PyPA pipx packages at Python 3.12: + - **argcomplete**: `pipx install argcomplete==3.5.0` - **poetry@1.8.3**: `pipx install --suffix=@1.8.3 poetry==1.8.3` - **poetry@1.7.1**: `pipx install --suffix=@1.7.1 poetry==1.7.1` - PyPA pipx packages at Python 3.10: From 0d0ee49d713537a59b5c48976da0ced5ff79796d Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Sun, 6 Oct 2024 17:32:32 +0200 Subject: [PATCH 03/12] fix: 'libgdbm6' has no installation candidate ... on Ubuntu 24.04. See commit ab36d99da93f2992d7c6bf17280e1b10c793d778 for more details. Signed-off-by: Stephan Linz --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d6fa663..5f26c39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -250,7 +250,7 @@ RUN apt-get install -y \ libreadline6-dev \ libgmp-dev \ libncurses5-dev \ - libgdbm6 \ + libgdbm6t64 \ libgdbm-dev \ libdb-dev \ uuid-dev From 4ef4297f9d7b93b9d1315ef8e2a02d1d0a596be4 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Tue, 8 Oct 2024 07:50:48 +0200 Subject: [PATCH 04/12] chore(ci): increase jobs timeout to 24 hours Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e94b72f..37b2971 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -40,6 +40,13 @@ jobs: # with sigstore/fulcio when running outside of PRs. id-token: write + # Allow to build longer than 6 hours, but this is only possible + # with self-hosted runners. 1440 min = 24 h. For details, see: + # https://github.com/orgs/community/discussions/26679 + # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions + # https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration + timeout-minutes: 1440 + steps: - name: Checkout repository uses: actions/checkout@v4 From 411317fd59effab99b05e79fafecd7a33f3d5533 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Sun, 6 Oct 2024 10:43:05 +0200 Subject: [PATCH 05/12] chore(ci): add QEMU static binaries for multi-arch Linux x86-64 (`linux/amd64`): https://hub.docker.com/r/amd64/ubuntu Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 7 + CONTRIBUTING.md | 49 +++++- Dockerfile | 213 ++++++++++++++++++--------- README.md | 162 +++++++++++--------- 4 files changed, 287 insertions(+), 144 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 37b2971..63b1359 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -82,6 +82,12 @@ jobs: if: github.event_name != 'pull_request' run: cosign version + # Install QEMU static binaries for multi-arch image build + # https://github.com/docker/setup-qemu-action + # https://docs.docker.com/build/ci/github-actions/multi-platform + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Set up BuildKit Docker container builder to be able to build # multi-platform images and export cache # https://github.com/docker/setup-buildx-action @@ -114,6 +120,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . + platforms: linux/amd64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f659553..b2ad6d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,15 +13,52 @@ If you would like to fix a bug or add a feature to our build images, see ## Testing Locally If you'd like to add a feature to any of the images, you'll need to verify the -image works locally first. After making changes to the ``Dockerfile``, you can -build your image with: +image works locally first. To build multi-platform images, you first need to +make sure that your [Docker environment is set up to support it]( +https://docs.docker.com/build/building/multi-platform/#prerequisites), +e.g. QEMU and a custom builder with self contained containerd image store. +To create such a custom builder, use the ``docker buildx create`` command: ```bash -docker build -t tiacsys/readourdocs-docker-images:local . +docker buildx create --name rod-ctn-builder --driver docker-container \ + --bootstrap --use ``` -This will take quite a long time, mostly due to LaTeX dependencies. The -resulting image will be at least around 17GB. +After making changes to the ``Dockerfile``, you can build your image with: + +```bash +docker buildx build --tag tiacsys/readourdocs-docker-images:local \ + --platform linux/amd64 \ + --builder rod-ctn-builder --load . +``` + +**ERROR: docker exporter does not currently support exporting manifest lists** + +Unfortunately, it is impossible to run that multi-platform image as local +container. Container images with support for multiple architectures are part of +the [OCI specification]( +https://github.com/opencontainers/image-spec/blob/main/image-index.md) and +Docker supports creating these as well. The image index (more commonly referred +to as the image manifest) contains some metadata about the image itself and an +array of actual manifests which specify the platform and the image layer +references. Docker supports creating these but only through the experimental +new builder, *buildx*. + +Buildx has some nice new features like support for better caching between +images as well as cleaner output during builds. However, it runs completely +independently of your standard local docker registry. If you run ``docker ps``, +you’ll see a buildx builder running as a container on your local machine. This +is a virtual builder that we created using ``docker buildx create``. + +**Simple build for native platform** + +```bash +docker build --tag tiacsys/readourdocs-docker-images:local . +``` + +This will take quite a long time, mostly due to LaTeX dependencies and required +rebuilds of components from source code for different platforms. The resulting +images will be at least around 17GB. Once your image is built, you can test your image locally by running a shell in a container using your new image: @@ -55,6 +92,8 @@ completely deleted at any time with: ```bash docker image rm tiacsys/readourdocs-docker-images:local +docker buildx rm rod-ctn-builder +docker buildx prune --all --force docker builder prune --all --force ``` diff --git a/Dockerfile b/Dockerfile index 5f26c39..c6679de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,21 @@ # -- see: https://hub.docker.com/_/ubuntu/tags # -- see: https://github.com/docker-library/official-images # -FROM ubuntu:noble-20240904.1 +# -- support Docker multi-platform image build +# -- see: https://docs.docker.com/build/building/multi-platform +# -- see: https://docs.docker.com/build/building/variables/#multi-platform-build-arguments +# +# -- TARGETPLATFORM=linux/amd64: TARGETOS=linux, TARGETARCH=amd64, TARGETVARIANT= +# + +# ############################################################################ +# +# Base system maintenance with official Ubuntu Docker image +# +# ############################################################################ + +FROM ubuntu:noble-20240904.1 AS base + LABEL mantainer="Stephan Linz " LABEL version="unstable" @@ -14,6 +28,109 @@ LABEL org.opencontainers.image.documentation="https://github.com/tiacsys/readour # ############################################################################ +# +# asdf-vm runtime version +# https://asdf-vm.com/ +# https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md +# + +# Define asdf-vm branch to be installed via git-clone +ENV ROD_ASDF_BRANCH=v0.14.1 + +# +# Rust runtime versions +# https://releases.rs/ +# + +# Define Rust versions to be installed via asdf +ENV ROD_RUST_VERSION_2024=1.81.0 +ENV ROD_RUST_VERSION_2023=1.76.0 +ENV ROD_RUST_VERSION_2022=1.67.1 + +# +# Golang runtime versions +# https://go.dev/doc/devel/release +# + +# Define Golang versions to be installed via asdf +ENV ROD_GOLANG_VERSION_2024=1.23.1 +ENV ROD_GOLANG_VERSION_2023=1.21.13 +ENV ROD_GOLANG_VERSION_2022=1.19.13 + +# +# Node.js runtime versions +# https://nodejs.org/en/about/previous-releases +# + +# Define Node.js versions to be installed via asdf +ENV ROD_NODEJS_VERSION_22=22.9.0 +ENV ROD_NODEJS_VERSION_20=20.17.0 +ENV ROD_NODEJS_VERSION_18=18.20.4 + +# +# Ruby runtime versions +# https://www.ruby-lang.org/en/downloads/branches +# https://www.ruby-lang.org/en/downloads/releases +# + +# Define Ruby versions to be installed via asdf +ENV ROD_RUBY_VERSION_33=3.3.5 +ENV ROD_RUBY_VERSION_32=3.2.5 +ENV ROD_RUBY_VERSION_31=3.1.6 + +# +# Python runtime versions +# https://www.python.org/downloads +# https://devguide.python.org/versions +# +# PyPy runtime versions +# https://downloads.python.org/pypy +# https://pypy.org/download_advanced.html +# https://pypy.org/categories/release.html +# https://doc.pypy.org/en/latest/index-of-release-notes.html +# + +# Define Python versions to be installed via asdf +ENV ROD_PYTHON_VERSION_312=3.12.7 +ENV ROD_PYTHON_VERSION_310=3.10.15 +ENV ROD_PYTHON_VERSION_27=2.7.18 +ENV ROD_PYPY_VERSION_3=pypy3.10-7.3.17 +ENV ROD_PYPY_VERSION_2=pypy2.7-7.3.17 + +# Define CPython default behaviour for compilations (shared libraries) +ENV PYTHON_CONFIGURE_OPTS=--enable-shared + +# Define Python package versions to be installed via pip +ENV ROD_PIP_VERSION=24.2 +ENV ROD_SETUPTOOLS_VERSION=75.1.0 +ENV ROD_VIRTUALENV_VERSION=20.26.6 +ENV ROD_WHEEL_VERSION=0.44.0 +ENV ROD_POETRY_VERSION=1.8.3 +ENV ROD_WEST_VERSION=1.2.0 + +# +# PyPA pipx for Python runtime version +# https://repology.org/project/pipx/versions +# https://pipx.pypa.io/stable/installation +# https://github.com/pypa/pipx +# + +# Define pipx version to be installed via asdf +ENV ROD_PIPX_VERSION=1.7.1 +ENV ROD_PIPX_ARGCOMPLETE_VERSION=3.5.0 + +# Define Python package versions to be installed via pipx +ENV ROD_POETRY_VERSION_18=1.8.3 +ENV ROD_POETRY_VERSION_17=1.7.1 +ENV ROD_POETRY_VERSION_16=1.6.1 +ENV ROD_POETRY_VERSION_15=1.5.1 +ENV ROD_POETRY_VERSION_14=1.4.2 +ENV ROD_POETRY_VERSION_13=1.3.2 +ENV ROD_POETRY_VERSION_12=1.2.2 +ENV ROD_POETRY_VERSION_11=1.1.15 + +# ############################################################################ + ENV DEBIAN_FRONTEND=noninteractive ENV LANG=C.UTF-8 @@ -233,7 +350,7 @@ RUN apt-get -y autoremove --purge RUN apt-get clean # asdf Golang extra requirements -# https://github.com/kennyp/asdf-golang#linux-debian +# https://github.com/asdf-community/asdf-golang#linux-debian RUN apt-get install -y \ coreutils RUN apt-get -y autoremove --purge @@ -303,12 +420,12 @@ USER docs WORKDIR /home/docs # Install asdf -RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --depth 1 --branch v0.14.1 +RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --depth 1 --branch $ROD_ASDF_BRANCH RUN echo ". /home/docs/.asdf/asdf.sh" >> /home/docs/.bashrc RUN echo ". /home/docs/.asdf/completions/asdf.bash" >> /home/docs/.bashrc # Activate asdf in current session -ENV PATH /home/docs/.asdf/shims:/home/docs/.asdf/bin:$PATH +ENV PATH=/home/docs/.asdf/shims:/home/docs/.asdf/bin:$PATH # Install asdf plugins RUN asdf plugin add pipx https://github.com/yozachar/asdf-pipx.git @@ -326,24 +443,29 @@ RUN mkdir -p /home/docs/.asdf/installs/pipx && \ mkdir -p /home/docs/.asdf/installs/golang && \ mkdir -p /home/docs/.asdf/installs/ruby +# Adding labels for external usage +LABEL asdf.branch=$ROD_ASDF_BRANCH + # Upgrade asdf version manager # https://github.com/asdf-vm/asdf RUN asdf update RUN asdf plugin update --all RUN asdf version +# ############################################################################ +# +# AMD/x86 64-bit architecture maintenance +# +# ############################################################################ + +FROM base AS build-amd64 + # ############################################################################ # # Rust runtime versions -# https://releases.rs/ # -# Define Rust versions to be installed via asdf -ENV ROD_RUST_VERSION_2022=1.67.1 -ENV ROD_RUST_VERSION_2023=1.76.0 -ENV ROD_RUST_VERSION_2024=1.81.0 - # Install Rust versions RUN asdf install rust $ROD_RUST_VERSION_2022 && \ asdf global rust $ROD_RUST_VERSION_2022 && \ @@ -370,14 +492,8 @@ RUN asdf list rust # # Golang runtime versions -# https://go.dev/doc/devel/release # -# Define Golang versions to be installed via asdf -ENV ROD_GOLANG_VERSION_2022=1.19.13 -ENV ROD_GOLANG_VERSION_2023=1.21.13 -ENV ROD_GOLANG_VERSION_2024=1.23.1 - # Install Golang versions RUN asdf install golang $ROD_GOLANG_VERSION_2022 && \ asdf global golang $ROD_GOLANG_VERSION_2022 && \ @@ -404,14 +520,8 @@ RUN asdf list golang # # Node.js runtime versions -# https://nodejs.org/en/about/previous-releases # -# Define Node.js versions to be installed via asdf -ENV ROD_NODEJS_VERSION_18=18.20.4 -ENV ROD_NODEJS_VERSION_20=20.17.0 -ENV ROD_NODEJS_VERSION_22=22.9.0 - # Install Node.js versions RUN asdf install nodejs $ROD_NODEJS_VERSION_18 && \ asdf global nodejs $ROD_NODEJS_VERSION_18 && \ @@ -438,15 +548,8 @@ RUN asdf list nodejs # # Ruby runtime versions -# https://www.ruby-lang.org/en/downloads/branches -# https://www.ruby-lang.org/en/downloads/releases # -# Define Ruby versions to be installed via asdf -ENV ROD_RUBY_VERSION_31=3.1.6 -ENV ROD_RUBY_VERSION_32=3.2.5 -ENV ROD_RUBY_VERSION_33=3.3.5 - # Install Ruby versions RUN asdf install ruby $ROD_RUBY_VERSION_31 && \ asdf global ruby $ROD_RUBY_VERSION_31 && \ @@ -472,26 +575,9 @@ RUN asdf list ruby # ############################################################################ # -# Python runtime versions -# https://www.python.org/downloads -# https://devguide.python.org/versions -# -# PyPy runtime versions -# https://downloads.python.org/pypy -# https://pypy.org/download_advanced.html -# https://pypy.org/categories/release.html -# https://doc.pypy.org/en/latest/index-of-release-notes.html +# Python and PyPy runtime versions # -# Define Python versions to be installed via asdf -ENV ROD_PYTHON_VERSION_27=2.7.18 -ENV ROD_PYTHON_VERSION_310=3.10.15 -ENV ROD_PYTHON_VERSION_312=3.12.7 -ENV ROD_PYPY_VERSION_2=pypy2.7-7.3.17 -ENV ROD_PYPY_VERSION_3=pypy3.10-7.3.17 - -ENV PYTHON_CONFIGURE_OPTS=--enable-shared - # Install Python versions RUN asdf install python $ROD_PYTHON_VERSION_27 && \ asdf global python $ROD_PYTHON_VERSION_27 && \ @@ -532,14 +618,6 @@ RUN asdf local python $ROD_PYPY_VERSION_2 && \ pip install --upgrade wheel==0.37.1 && \ pip install --upgrade poetry==1.1.15 -# Define Python package versions to be installed via pip -ENV ROD_PIP_VERSION=24.2 -ENV ROD_SETUPTOOLS_VERSION=75.1.0 -ENV ROD_VIRTUALENV_VERSION=20.26.6 -ENV ROD_WHEEL_VERSION=0.44.0 -ENV ROD_POETRY_VERSION=1.8.3 -ENV ROD_WEST_VERSION=1.2.0 - # Install Python package versions RUN asdf local python $ROD_PYTHON_VERSION_310 && \ pip install --upgrade pip==$ROD_PIP_VERSION && \ @@ -586,19 +664,20 @@ LABEL python.west=$ROD_WEST_VERSION RUN asdf local python $ROD_PYTHON_VERSION_312 RUN asdf list python +# ############################################################################ +# +# All architectures maintenance +# +# ############################################################################ + +FROM build-${TARGETARCH} AS build + # ############################################################################ # # PyPA pipx for Python runtime version -# https://repology.org/project/pipx/versions -# https://pipx.pypa.io/stable/installation -# https://github.com/pypa/pipx # -# Define pipx version to be installed via asdf -ENV ROD_PIPX_VERSION=1.7.1 -ENV ROD_PIPX_ARGCOMPLETE_VERSION=3.5.0 - # Install pipx version RUN asdf install pipx $ROD_PIPX_VERSION && \ asdf global pipx $ROD_PIPX_VERSION && \ @@ -622,16 +701,6 @@ RUN pipx install argcomplete==$ROD_PIPX_ARGCOMPLETE_VERSION && \ # ############################################################################ -# Define Python package versions to be installed via pipx -ENV ROD_POETRY_VERSION_18=1.8.3 -ENV ROD_POETRY_VERSION_17=1.7.1 -ENV ROD_POETRY_VERSION_16=1.6.1 -ENV ROD_POETRY_VERSION_15=1.5.1 -ENV ROD_POETRY_VERSION_14=1.4.2 -ENV ROD_POETRY_VERSION_13=1.3.2 -ENV ROD_POETRY_VERSION_12=1.2.2 -ENV ROD_POETRY_VERSION_11=1.1.15 - # Install Python 3.12 package versions RUN asdf local python $ROD_PYTHON_VERSION_312 && \ pipx install --suffix=@$ROD_POETRY_VERSION_18 \ diff --git a/README.md b/README.md index f8d6a5c..0fc4cf6 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ## Description -This project creates the full-stack Docker image for processing [tutorial]( -https://bridle.tiac-systems.net/tutorials) and [training]( -https://bridle.tiac-systems.net/trainings) materials. +This project creates the full-stack and multi-arch Docker images for processing +[tutorial](https://bridle.tiac-systems.net/tutorials) and +[training](https://bridle.tiac-systems.net/trainings) materials. ## Canonical source @@ -18,70 +18,98 @@ README.md). ## Content -- based on [Ubuntu official Docker image]( - https://github.com/docker-library/official-images), - **ubuntu:noble-20240904.1** - - Ubuntu 24.04.1 LTS -- extend with: - - Ubuntu system package upgrade - - locales for English unicode (`en_US.UTF-8`) - - locales for German unicode (`de_DE.UTF-8`) - - **Python 3.12.3** (`python3`, `pip3`) - - **LLVM C/C++** compiler **18.1.3** (`clang`, `clang++`) - - **GNU C/C++** compiler **13.2.0** (`gcc`, `g++`) - - **GNU Fortran 95** compiler **13.2.0** (`gfortran`) - - **OpenJDK 21** (`java`, `javac`) - - **SWIG 4.2.0** (`swig`) - - **TeX Live 2023** (`latex`, `xelatex`, `pdflatex`, `xindy`, `latexmk`) - - **ImageMagick 6.9.12.98** (`convert`) - - **Graphviz 2.43.0** (`dot`) - - **PlantUML 1.2020.2** (`plantuml`) - - **librsvg2-bin 2.58.0** (`rsvg-convert`) - - **poppler-utils 24.02.0** (`pdf2svg`, `pdftocairo`) -- extend with asdf: - - **Rust**: - - **1.81.0**: `asdf local rust 1.81.0` (default) - - **1.76.0**: `asdf global rust 1.76.0` - - **1.67.1**: `asdf global rust 1.67.1` - - **Golang**: - - **1.23.1**: `asdf local golang 1.23.1` (default) - - **1.21.13**: `asdf global golang 1.21.13` - - **1.19.13**: `asdf global golang 1.19.13` - - **Nodejs**: - - **22.9.0**: `asdf local nodejs 22.9.0` (default) - - **20.17.0**: `asdf global nodejs 20.17.0` - - **18.20.4**: `asdf global nodejs 18.20.4` - - **Ruby**: - - **3.3.5**: `asdf local ruby 3.3.5` (default) - - **3.2.5**: `asdf global ruby 3.2.5` - - **3.1.6**: `asdf global ruby 3.1.6` - - **Python**: - - **3.12.7**: `asdf local python 3.12.7` (default) - - 3.11.10: security until October 2027, (deprecated) - - **3.10.15**: `asdf global python 3.10.15` - - **pypy3.10-7.3.17**: `asdf global python pypy3.10-7.3.17` - - 3.9.20: security until October 2025, (deprecated) - - 3.8.20: security until October 2024, (deprecated) - - 3.7.17: end-of-life since June 2023 - - 3.6.15: end-of-life since December 2021 - - 3.5.10: end-of-life since September 2020 - - 3.4.10: end-of-life since March 2019 - - 3.3.7: end-of-life since September 2017 - - 3.2.6: end-of-life since February 2016 - - 3.1.5: end-of-life since April 2012 - - 3.0.1: end-of-life since June 2009 - - **2.7.18**: `asdf global python 2.7.18` (obsolete) - - **pypy2.7-7.3.17**: `asdf global python pypy2.7-7.3.17` - - **PyPA pipx**: - - **1.7.1**: `asdf local pipx 1.7.1` (default) -- Python packages: - - `pip==24.2` - - `setuptools==75.1.0` - - `virtualenv==20.26.6` - - `wheel==0.44.0` - - `poetry==1.8.3` - - `west==1.2.0` - - only-binary: `numpy`, `scipy`, `pandas`, `matplotlib` +Based on [Ubuntu official Docker image]( +https://github.com/docker-library/official-images), +**ubuntu:noble-20240904.1**: + +- [Ubuntu](https://hub.docker.com/_/ubuntu) 24.04.1 LTS +- Docker image architectures: + - Linux x86-64 (`linux/amd64`): https://hub.docker.com/r/amd64/ubuntu + +### Ubuntu system packages + +- Ubuntu system package upgrade +- locales for English unicode (`en_US.UTF-8`) +- locales for German unicode (`de_DE.UTF-8`) +- **Python 3.12.3** (`python3`, `pip3`) +- **LLVM C/C++** compiler **18.1.3** (`clang`, `clang++`) +- **GNU C/C++** compiler **13.2.0** (`gcc`, `g++`) +- **GNU Fortran 95** compiler **13.2.0** (`gfortran`) +- **OpenJDK 21** (`java`, `javac`) +- **SWIG 4.2.0** (`swig`) +- **TeX Live 2023** (`latex`, `xelatex`, `pdflatex`, `xindy`, `latexmk`) +- **ImageMagick 6.9.12.98** (`convert`) +- **Graphviz 2.43.0** (`dot`) +- **PlantUML 1.2020.2** (`plantuml`) +- **librsvg2-bin 2.58.0** (`rsvg-convert`) +- **poppler-utils 24.02.0** (`pdf2svg`, `pdftocairo`) + +### Multiple runtime environments + +Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: + +| runtime environments | environment variable | `linux/amd64` | +| :------------------- | :------------------------ | :---: | +| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | +| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | +| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | +| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | +| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | +| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | +| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | +| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | +| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | +| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | +| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | +| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | +| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | +| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | +| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | +| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | +| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | +| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | + +**bold**: default runtime environment + +### Python 3 packages + +Based on [Python Package Index](https://pypi.org/) with pip: + +| PyPI package name | environment variable | `linux/amd64` | +| :--------------------- | :------------------------ | :---: | +| `pip==24.2` | `ROD_PIP_VERSION` | X | +| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | +| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | +| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | +| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | +| `west==1.2.0` | `ROD_WEST_VERSION` | X | +| `numpy` | | *(X)* | +| `scipy` | | *(X)* | +| `pandas` | | *(X)* | +| `matplotlib` | | *(X)* | + +*(X)*: binary only and not in PyPy (CPython only) + +### Python 2 packages (obsolete) + +Based on [Python Package Index](https://pypi.org/) with pip: + +| PyPI package name | `linux/amd64` | +| :--------------------- | :---: | +| `pip==20.3.4` | X | +| `setuptools==44.1.1` | X | +| `virtualenv==20.15.1` | X | +| `wheel==0.37.1` | X | +| `poetry==1.1.15` | X | +| `numpy==1.16.6` | *(X)* | +| `scipy==1.2.3` | *(X)* | +| `pandas==0.24.2` | *(X)* | +| `matplotlib==2.2.5` | *(X)* | + +*(X)*: binary only and not in PyPy (CPython only) + +### PyPA pipx packages + - PyPA pipx packages at Python 3.12: - **argcomplete**: `pipx install argcomplete==3.5.0` - **poetry@1.8.3**: `pipx install --suffix=@1.8.3 poetry==1.8.3` From 8dbb15e7bb9dedd5c6bab62c6f20f01f4e1ed9db Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Sun, 6 Oct 2024 14:58:24 +0200 Subject: [PATCH 06/12] chore(ci): build multi-arch image for ARMv7 32-bit ARMv7 32-bit (`linux/arm/v7`): https://hub.docker.com/r/arm32v7/ubuntu Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 2 +- CONTRIBUTING.md | 2 +- Dockerfile | 142 +++++++++++++++++++++++++++ README.md | 87 ++++++++-------- 4 files changed, 188 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 63b1359..2b4a120 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -120,7 +120,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64 + platforms: linux/amd64,linux/arm/v7 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2ad6d0..d3fe412 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ After making changes to the ``Dockerfile``, you can build your image with: ```bash docker buildx build --tag tiacsys/readourdocs-docker-images:local \ - --platform linux/amd64 \ + --platform linux/amd64,linux/arm/v7 \ --builder rod-ctn-builder --load . ``` diff --git a/Dockerfile b/Dockerfile index c6679de..2def4c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ # -- see: https://docs.docker.com/build/building/variables/#multi-platform-build-arguments # # -- TARGETPLATFORM=linux/amd64: TARGETOS=linux, TARGETARCH=amd64, TARGETVARIANT= +# -- TARGETPLATFORM=linux/arm/v7: TARGETOS=linux, TARGETARCH=arm, TARGETVARIANT=v7 # # ############################################################################ @@ -664,6 +665,147 @@ LABEL python.west=$ROD_WEST_VERSION RUN asdf local python $ROD_PYTHON_VERSION_312 RUN asdf list python +# ############################################################################ +# +# ARMv7 32-bit architecture maintenance +# +# ############################################################################ + +FROM base AS build-arm + +# ############################################################################ + +# +# Rust runtime versions +# + +# Install Rust versions +RUN asdf install rust $ROD_RUST_VERSION_2024 && \ + asdf global rust $ROD_RUST_VERSION_2024 && \ + asdf reshim rust + +# Adding labels for external usage +LABEL rust.version_2024=$ROD_RUST_VERSION_2024 + +# Set default Rust version +RUN asdf local rust $ROD_RUST_VERSION_2024 +RUN asdf list rust + +# ############################################################################ + +# +# Golang runtime versions +# + +# Install Golang versions +RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \ + asdf global golang $ROD_GOLANG_VERSION_2024 && \ + asdf reshim golang + +# Adding labels for external usage +LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024 + +# Set default Golang version +RUN asdf local golang $ROD_GOLANG_VERSION_2024 +RUN asdf list golang + +# ############################################################################ + +# +# Node.js runtime versions +# + +# Install Node.js versions +RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \ + asdf global nodejs $ROD_NODEJS_VERSION_22 && \ + asdf reshim nodejs + +# Adding labels for external usage +LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22 + +# Set default Node.js version +RUN asdf local nodejs $ROD_NODEJS_VERSION_22 +RUN asdf list nodejs + +# ############################################################################ + +# +# Ruby runtime versions +# + +# Install Ruby versions +RUN asdf install ruby $ROD_RUBY_VERSION_33 && \ + asdf global ruby $ROD_RUBY_VERSION_33 && \ + asdf reshim ruby + +# Adding labels for external usage +LABEL ruby.version_33=$ROD_RUBY_VERSION_33 + +# Set default Ruby version +RUN asdf local ruby $ROD_RUBY_VERSION_33 +RUN asdf list ruby + +# ############################################################################ + +# +# Python and PyPy runtime versions +# + +# Install Python versions +RUN asdf install python $ROD_PYTHON_VERSION_27 && \ + asdf global python $ROD_PYTHON_VERSION_27 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_310 && \ + asdf global python $ROD_PYTHON_VERSION_310 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_312 && \ + asdf global python $ROD_PYTHON_VERSION_312 && \ + asdf reshim python + +# Python2 dependencies are hardcoded because Python2 is +# deprecated. Updating them to their latest versions may raise +# incompatibility issues. +RUN asdf local python $ROD_PYTHON_VERSION_27 && \ + pip install --upgrade pip==20.3.4 && \ + pip install --upgrade setuptools==44.1.1 && \ + pip install --upgrade virtualenv==20.15.1 && \ + pip install --upgrade wheel==0.37.1 && \ + pip install --upgrade poetry==1.1.15 + +# Install Python package versions +RUN asdf local python $ROD_PYTHON_VERSION_310 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +RUN asdf local python $ROD_PYTHON_VERSION_312 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +# Adding labels for external usage +LABEL python.version_27=$ROD_PYTHON_VERSION_27 +LABEL python.version_310=$ROD_PYTHON_VERSION_310 +LABEL python.version_312=$ROD_PYTHON_VERSION_312 +LABEL python.pip=$ROD_PIP_VERSION +LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION +LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION +LABEL python.wheel=$ROD_WHEEL_VERSION +LABEL python.poetry=$ROD_POETRY_VERSION +LABEL python.west=$ROD_WEST_VERSION + +# Set default Python version +RUN asdf local python $ROD_PYTHON_VERSION_312 +RUN asdf list python + # ############################################################################ # # All architectures maintenance diff --git a/README.md b/README.md index 0fc4cf6..85d7753 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ https://github.com/docker-library/official-images), - [Ubuntu](https://hub.docker.com/_/ubuntu) 24.04.1 LTS - Docker image architectures: - Linux x86-64 (`linux/amd64`): https://hub.docker.com/r/amd64/ubuntu + - ARMv7 32-bit (`linux/arm/v7`): https://hub.docker.com/r/arm32v7/ubuntu ### Ubuntu system packages @@ -48,26 +49,26 @@ https://github.com/docker-library/official-images), Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: -| runtime environments | environment variable | `linux/amd64` | -| :------------------- | :------------------------ | :---: | -| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | -| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | -| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | -| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | -| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | -| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | -| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | -| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | -| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | -| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | -| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | -| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | -| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | -| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | -| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | -| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | -| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | -| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | +| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | +| :------------------- | :------------------------ | :---: | :---: | +| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | +| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | +| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | +| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | +| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | +| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | +| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | +| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | +| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | +| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | +| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | +| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | +| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | +| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | +| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | +| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | +| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | +| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **bold**: default runtime environment @@ -75,18 +76,18 @@ Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | environment variable | `linux/amd64` | -| :--------------------- | :------------------------ | :---: | -| `pip==24.2` | `ROD_PIP_VERSION` | X | -| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | -| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | -| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | -| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | -| `west==1.2.0` | `ROD_WEST_VERSION` | X | -| `numpy` | | *(X)* | -| `scipy` | | *(X)* | -| `pandas` | | *(X)* | -| `matplotlib` | | *(X)* | +| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | +| :--------------------- | :------------------------ | :---: | :---: | +| `pip==24.2` | `ROD_PIP_VERSION` | X | X | +| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | +| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | +| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | +| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | +| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | +| `numpy` | | *(X)* | | +| `scipy` | | *(X)* | | +| `pandas` | | *(X)* | | +| `matplotlib` | | *(X)* | | *(X)*: binary only and not in PyPy (CPython only) @@ -94,17 +95,17 @@ Based on [Python Package Index](https://pypi.org/) with pip: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | `linux/amd64` | -| :--------------------- | :---: | -| `pip==20.3.4` | X | -| `setuptools==44.1.1` | X | -| `virtualenv==20.15.1` | X | -| `wheel==0.37.1` | X | -| `poetry==1.1.15` | X | -| `numpy==1.16.6` | *(X)* | -| `scipy==1.2.3` | *(X)* | -| `pandas==0.24.2` | *(X)* | -| `matplotlib==2.2.5` | *(X)* | +| PyPI package name | `linux/amd64` | `linux/arm/v7` | +| :--------------------- | :---: | :---: | +| `pip==20.3.4` | X | X | +| `setuptools==44.1.1` | X | X | +| `virtualenv==20.15.1` | X | X | +| `wheel==0.37.1` | X | X | +| `poetry==1.1.15` | X | X | +| `numpy==1.16.6` | *(X)* | | +| `scipy==1.2.3` | *(X)* | | +| `pandas==0.24.2` | *(X)* | | +| `matplotlib==2.2.5` | *(X)* | | *(X)*: binary only and not in PyPy (CPython only) From 3b69ef43766e093d962ecc87cf9eb0e1b520a4d2 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Mon, 7 Oct 2024 08:18:12 +0200 Subject: [PATCH 07/12] chore(ci): build multi-arch image for ARMv8 64-bit ARMv8 64-bit (`linux/arm64`): https://hub.docker.com/r/arm64v8/ubuntu Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 2 +- CONTRIBUTING.md | 2 +- Dockerfile | 150 +++++++++++++++++++++++++++ README.md | 87 ++++++++-------- 4 files changed, 196 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2b4a120..9e9ce21 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -120,7 +120,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm/v7 + platforms: linux/amd64,linux/arm/v7,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3fe412..26cca4a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ After making changes to the ``Dockerfile``, you can build your image with: ```bash docker buildx build --tag tiacsys/readourdocs-docker-images:local \ - --platform linux/amd64,linux/arm/v7 \ + --platform linux/amd64,linux/arm/v7,linux/arm64 \ --builder rod-ctn-builder --load . ``` diff --git a/Dockerfile b/Dockerfile index 2def4c7..c15a150 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ # # -- TARGETPLATFORM=linux/amd64: TARGETOS=linux, TARGETARCH=amd64, TARGETVARIANT= # -- TARGETPLATFORM=linux/arm/v7: TARGETOS=linux, TARGETARCH=arm, TARGETVARIANT=v7 +# -- TARGETPLATFORM=linux/arm64: TARGETOS=linux, TARGETARCH=arm64, TARGETVARIANT= # # ############################################################################ @@ -806,6 +807,155 @@ LABEL python.west=$ROD_WEST_VERSION RUN asdf local python $ROD_PYTHON_VERSION_312 RUN asdf list python +# ############################################################################ +# +# ARMv8 64-bit architecture maintenance +# +# ############################################################################ + +FROM base AS build-arm64 + +# ############################################################################ + +# +# Rust runtime versions +# + +# Install Rust versions +RUN asdf install rust $ROD_RUST_VERSION_2024 && \ + asdf global rust $ROD_RUST_VERSION_2024 && \ + asdf reshim rust + +# Adding labels for external usage +LABEL rust.version_2024=$ROD_RUST_VERSION_2024 + +# Set default Rust version +RUN asdf local rust $ROD_RUST_VERSION_2024 +RUN asdf list rust + +# ############################################################################ + +# +# Golang runtime versions +# + +# HOTFIX: Avoid silent failure, with reason inside of curl +# <- curl: (55) Send failure: Broken pipe +# <- OpenSSL SSL_write: Broken pipe, errno 32 +RUN echo "--insecure" > /home/docs/.curlrc + +# Install Golang versions +RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \ + asdf global golang $ROD_GOLANG_VERSION_2024 && \ + asdf reshim golang + +# HOTFIX: Revert silent failure hotfix from above +RUN rm -f /home/docs/.curlrc + +# Adding labels for external usage +LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024 + +# Set default Golang version +RUN asdf local golang $ROD_GOLANG_VERSION_2024 +RUN asdf list golang + +# ############################################################################ + +# +# Node.js runtime versions +# + +# Install Node.js versions +RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \ + asdf global nodejs $ROD_NODEJS_VERSION_22 && \ + asdf reshim nodejs + +# Adding labels for external usage +LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22 + +# Set default Node.js version +RUN asdf local nodejs $ROD_NODEJS_VERSION_22 +RUN asdf list nodejs + +# ############################################################################ + +# +# Ruby runtime versions +# + +# Install Ruby versions +RUN asdf install ruby $ROD_RUBY_VERSION_33 && \ + asdf global ruby $ROD_RUBY_VERSION_33 && \ + asdf reshim ruby + +# Adding labels for external usage +LABEL ruby.version_33=$ROD_RUBY_VERSION_33 + +# Set default Ruby version +RUN asdf local ruby $ROD_RUBY_VERSION_33 +RUN asdf list ruby + +# ############################################################################ + +# +# Python and PyPy runtime versions +# + +# Install Python versions +RUN asdf install python $ROD_PYTHON_VERSION_27 && \ + asdf global python $ROD_PYTHON_VERSION_27 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_310 && \ + asdf global python $ROD_PYTHON_VERSION_310 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_312 && \ + asdf global python $ROD_PYTHON_VERSION_312 && \ + asdf reshim python + +# Python2 dependencies are hardcoded because Python2 is +# deprecated. Updating them to their latest versions may raise +# incompatibility issues. +RUN asdf local python $ROD_PYTHON_VERSION_27 && \ + pip install --upgrade pip==20.3.4 && \ + pip install --upgrade setuptools==44.1.1 && \ + pip install --upgrade virtualenv==20.15.1 && \ + pip install --upgrade wheel==0.37.1 && \ + pip install --upgrade poetry==1.1.15 + +# Install Python package versions +RUN asdf local python $ROD_PYTHON_VERSION_310 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +RUN asdf local python $ROD_PYTHON_VERSION_312 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +# Adding labels for external usage +LABEL python.version_27=$ROD_PYTHON_VERSION_27 +LABEL python.version_310=$ROD_PYTHON_VERSION_310 +LABEL python.version_312=$ROD_PYTHON_VERSION_312 +LABEL python.pip=$ROD_PIP_VERSION +LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION +LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION +LABEL python.wheel=$ROD_WHEEL_VERSION +LABEL python.poetry=$ROD_POETRY_VERSION +LABEL python.west=$ROD_WEST_VERSION + +# Set default Python version +RUN asdf local python $ROD_PYTHON_VERSION_312 +RUN asdf list python + # ############################################################################ # # All architectures maintenance diff --git a/README.md b/README.md index 85d7753..6dc7588 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ https://github.com/docker-library/official-images), - Docker image architectures: - Linux x86-64 (`linux/amd64`): https://hub.docker.com/r/amd64/ubuntu - ARMv7 32-bit (`linux/arm/v7`): https://hub.docker.com/r/arm32v7/ubuntu + - ARMv8 64-bit (`linux/arm64`): https://hub.docker.com/r/arm64v8/ubuntu ### Ubuntu system packages @@ -49,26 +50,26 @@ https://github.com/docker-library/official-images), Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: -| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | -| :------------------- | :------------------------ | :---: | :---: | -| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | -| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | -| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | -| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | -| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | -| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | -| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | -| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | -| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | -| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | -| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | -| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | -| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | -| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | -| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | -| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | -| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | -| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | +| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | +| :------------------- | :------------------------ | :---: | :---: | :---: | +| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | +| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | +| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | +| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | +| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | +| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | +| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | +| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | +| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | +| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | +| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | +| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | +| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | +| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | +| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | +| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | +| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | +| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | **bold**: default runtime environment @@ -76,18 +77,18 @@ Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | -| :--------------------- | :------------------------ | :---: | :---: | -| `pip==24.2` | `ROD_PIP_VERSION` | X | X | -| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | -| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | -| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | -| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | -| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | -| `numpy` | | *(X)* | | -| `scipy` | | *(X)* | | -| `pandas` | | *(X)* | | -| `matplotlib` | | *(X)* | | +| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | +| :--------------------- | :------------------------ | :---: | :---: | :---: | +| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | +| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | +| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | +| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | +| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | +| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | +| `numpy` | | *(X)* | | | +| `scipy` | | *(X)* | | | +| `pandas` | | *(X)* | | | +| `matplotlib` | | *(X)* | | | *(X)*: binary only and not in PyPy (CPython only) @@ -95,17 +96,17 @@ Based on [Python Package Index](https://pypi.org/) with pip: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | `linux/amd64` | `linux/arm/v7` | -| :--------------------- | :---: | :---: | -| `pip==20.3.4` | X | X | -| `setuptools==44.1.1` | X | X | -| `virtualenv==20.15.1` | X | X | -| `wheel==0.37.1` | X | X | -| `poetry==1.1.15` | X | X | -| `numpy==1.16.6` | *(X)* | | -| `scipy==1.2.3` | *(X)* | | -| `pandas==0.24.2` | *(X)* | | -| `matplotlib==2.2.5` | *(X)* | | +| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | +| :--------------------- | :---: | :---: | :---: | +| `pip==20.3.4` | X | X | X | +| `setuptools==44.1.1` | X | X | X | +| `virtualenv==20.15.1` | X | X | X | +| `wheel==0.37.1` | X | X | X | +| `poetry==1.1.15` | X | X | X | +| `numpy==1.16.6` | *(X)* | | | +| `scipy==1.2.3` | *(X)* | | | +| `pandas==0.24.2` | *(X)* | | | +| `matplotlib==2.2.5` | *(X)* | | | *(X)*: binary only and not in PyPy (CPython only) From 9aa2769d81fa6eb7174e37809d598d65b110a553 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Mon, 7 Oct 2024 08:27:49 +0200 Subject: [PATCH 08/12] chore(ci): build multi-arch image for RISC-V 64-bit RISC-V 64-bit (`linux/riscv64`): https://hub.docker.com/r/riscv64/ubuntu Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 2 +- CONTRIBUTING.md | 2 +- Dockerfile | 124 +++++++++++++++++++++++++++ README.md | 89 +++++++++---------- 4 files changed, 172 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 9e9ce21..f7cd381 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -120,7 +120,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26cca4a..d7da8de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ After making changes to the ``Dockerfile``, you can build your image with: ```bash docker buildx build --tag tiacsys/readourdocs-docker-images:local \ - --platform linux/amd64,linux/arm/v7,linux/arm64 \ + --platform linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64 \ --builder rod-ctn-builder --load . ``` diff --git a/Dockerfile b/Dockerfile index c15a150..d62ea47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ # -- TARGETPLATFORM=linux/amd64: TARGETOS=linux, TARGETARCH=amd64, TARGETVARIANT= # -- TARGETPLATFORM=linux/arm/v7: TARGETOS=linux, TARGETARCH=arm, TARGETVARIANT=v7 # -- TARGETPLATFORM=linux/arm64: TARGETOS=linux, TARGETARCH=arm64, TARGETVARIANT= +# -- TARGETPLATFORM=linux/riscv64: TARGETOS=linux, TARGETARCH=riscv64, TARGETVARIANT= # # ############################################################################ @@ -956,6 +957,129 @@ LABEL python.west=$ROD_WEST_VERSION RUN asdf local python $ROD_PYTHON_VERSION_312 RUN asdf list python +# ############################################################################ +# +# RISC-V 64-bit architecture maintenance +# +# ############################################################################ + +FROM base AS build-riscv64 + +# ############################################################################ + +# +# Rust runtime versions +# + +# Install Rust versions +RUN asdf install rust $ROD_RUST_VERSION_2024 && \ + asdf global rust $ROD_RUST_VERSION_2024 && \ + asdf reshim rust + +# Adding labels for external usage +LABEL rust.version_2024=$ROD_RUST_VERSION_2024 + +# Set default Rust version +RUN asdf local rust $ROD_RUST_VERSION_2024 +RUN asdf list rust + +# ############################################################################ + +# +# Golang runtime versions +# + +# Install Golang versions +RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \ + asdf global golang $ROD_GOLANG_VERSION_2024 && \ + asdf reshim golang + +# Adding labels for external usage +LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024 + +# Set default Golang version +RUN asdf local golang $ROD_GOLANG_VERSION_2024 +RUN asdf list golang + +# ############################################################################ + +# +# Ruby runtime versions +# + +# Install Ruby versions +RUN asdf install ruby $ROD_RUBY_VERSION_33 && \ + asdf global ruby $ROD_RUBY_VERSION_33 && \ + asdf reshim ruby + +# Adding labels for external usage +LABEL ruby.version_33=$ROD_RUBY_VERSION_33 + +# Set default Ruby version +RUN asdf local ruby $ROD_RUBY_VERSION_33 +RUN asdf list ruby + +# ############################################################################ + +# +# Python and PyPy runtime versions +# + +# Install Python versions +RUN asdf install python $ROD_PYTHON_VERSION_27 && \ + asdf global python $ROD_PYTHON_VERSION_27 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_310 && \ + asdf global python $ROD_PYTHON_VERSION_310 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_312 && \ + asdf global python $ROD_PYTHON_VERSION_312 && \ + asdf reshim python + +# Python2 dependencies are hardcoded because Python2 is +# deprecated. Updating them to their latest versions may raise +# incompatibility issues. +RUN asdf local python $ROD_PYTHON_VERSION_27 && \ + pip install --upgrade pip==20.3.4 && \ + pip install --upgrade setuptools==44.1.1 && \ + pip install --upgrade virtualenv==20.15.1 && \ + pip install --upgrade wheel==0.37.1 && \ + pip install --upgrade poetry==1.1.15 + +# Install Python package versions +RUN asdf local python $ROD_PYTHON_VERSION_310 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +RUN asdf local python $ROD_PYTHON_VERSION_312 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +# Adding labels for external usage +LABEL python.version_27=$ROD_PYTHON_VERSION_27 +LABEL python.version_310=$ROD_PYTHON_VERSION_310 +LABEL python.version_312=$ROD_PYTHON_VERSION_312 +LABEL python.pip=$ROD_PIP_VERSION +LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION +LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION +LABEL python.wheel=$ROD_WHEEL_VERSION +LABEL python.poetry=$ROD_POETRY_VERSION +LABEL python.west=$ROD_WEST_VERSION + +# Set default Python version +RUN asdf local python $ROD_PYTHON_VERSION_312 +RUN asdf list python + # ############################################################################ # # All architectures maintenance diff --git a/README.md b/README.md index 6dc7588..32a60d4 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ https://github.com/docker-library/official-images), - Linux x86-64 (`linux/amd64`): https://hub.docker.com/r/amd64/ubuntu - ARMv7 32-bit (`linux/arm/v7`): https://hub.docker.com/r/arm32v7/ubuntu - ARMv8 64-bit (`linux/arm64`): https://hub.docker.com/r/arm64v8/ubuntu + - RISC-V 64-bit (`linux/riscv64`): https://hub.docker.com/r/riscv64/ubuntu ### Ubuntu system packages @@ -50,45 +51,47 @@ https://github.com/docker-library/official-images), Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: -| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | -| :------------------- | :------------------------ | :---: | :---: | :---: | -| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | -| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | -| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | -| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | -| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | -| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | -| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | -| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | -| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | -| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | -| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | -| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | -| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | -| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | -| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | -| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | -| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | -| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | +| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | +| :------------------- | :------------------------ | :---: | :---: | :---: | :---: | +| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | **X** | +| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | | +| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | | +| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | **X** | +| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | | +| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | | +| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | | +| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | | +| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | | +| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | **X** | +| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | | +| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | | +| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | **X** | +| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | X | +| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | X | +| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | | +| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | | +| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | **X** | **bold**: default runtime environment +The build of Node.js from source code fails on `linux/riscv64`! + ### Python 3 packages Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | -| :--------------------- | :------------------------ | :---: | :---: | :---: | -| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | -| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | -| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | -| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | -| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | -| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | -| `numpy` | | *(X)* | | | -| `scipy` | | *(X)* | | | -| `pandas` | | *(X)* | | | -| `matplotlib` | | *(X)* | | | +| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | +| :--------------------- | :------------------------ | :---: | :---: | :---: | :---: | +| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | X | +| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | X | +| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | X | +| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | X | +| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | X | +| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | X | +| `numpy` | | *(X)* | | | | +| `scipy` | | *(X)* | | | | +| `pandas` | | *(X)* | | | | +| `matplotlib` | | *(X)* | | | | *(X)*: binary only and not in PyPy (CPython only) @@ -96,17 +99,17 @@ Based on [Python Package Index](https://pypi.org/) with pip: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | -| :--------------------- | :---: | :---: | :---: | -| `pip==20.3.4` | X | X | X | -| `setuptools==44.1.1` | X | X | X | -| `virtualenv==20.15.1` | X | X | X | -| `wheel==0.37.1` | X | X | X | -| `poetry==1.1.15` | X | X | X | -| `numpy==1.16.6` | *(X)* | | | -| `scipy==1.2.3` | *(X)* | | | -| `pandas==0.24.2` | *(X)* | | | -| `matplotlib==2.2.5` | *(X)* | | | +| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | +| :--------------------- | :---: | :---: | :---: | :---: | +| `pip==20.3.4` | X | X | X | X | +| `setuptools==44.1.1` | X | X | X | X | +| `virtualenv==20.15.1` | X | X | X | X | +| `wheel==0.37.1` | X | X | X | X | +| `poetry==1.1.15` | X | X | X | X | +| `numpy==1.16.6` | *(X)* | | | | +| `scipy==1.2.3` | *(X)* | | | | +| `pandas==0.24.2` | *(X)* | | | | +| `matplotlib==2.2.5` | *(X)* | | | | *(X)*: binary only and not in PyPy (CPython only) From 697aa4cf45980b9bb8fc7edc6756d555c1962308 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Mon, 7 Oct 2024 08:28:42 +0200 Subject: [PATCH 09/12] chore(ci): build multi-arch image for IBM POWER8 IBM POWER8 (`linux/ppc64le`): https://hub.docker.com/r/ppc64le/ubuntu Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 2 +- CONTRIBUTING.md | 2 +- Dockerfile | 142 +++++++++++++++++++++++++++ README.md | 87 ++++++++-------- 4 files changed, 188 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f7cd381..f366131 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -120,7 +120,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64 + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7da8de..c9dd90a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ After making changes to the ``Dockerfile``, you can build your image with: ```bash docker buildx build --tag tiacsys/readourdocs-docker-images:local \ - --platform linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64 \ + --platform linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le \ --builder rod-ctn-builder --load . ``` diff --git a/Dockerfile b/Dockerfile index d62ea47..550b315 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ # -- TARGETPLATFORM=linux/arm/v7: TARGETOS=linux, TARGETARCH=arm, TARGETVARIANT=v7 # -- TARGETPLATFORM=linux/arm64: TARGETOS=linux, TARGETARCH=arm64, TARGETVARIANT= # -- TARGETPLATFORM=linux/riscv64: TARGETOS=linux, TARGETARCH=riscv64, TARGETVARIANT= +# -- TARGETPLATFORM=linux/ppc64le: TARGETOS=linux, TARGETARCH=ppc64le, TARGETVARIANT= # # ############################################################################ @@ -1080,6 +1081,147 @@ LABEL python.west=$ROD_WEST_VERSION RUN asdf local python $ROD_PYTHON_VERSION_312 RUN asdf list python +# ############################################################################ +# +# IBM POWER8 architecture maintenance +# +# ############################################################################ + +FROM base AS build-ppc64le + +# ############################################################################ + +# +# Rust runtime versions +# + +# Install Rust versions +RUN asdf install rust $ROD_RUST_VERSION_2024 && \ + asdf global rust $ROD_RUST_VERSION_2024 && \ + asdf reshim rust + +# Adding labels for external usage +LABEL rust.version_2024=$ROD_RUST_VERSION_2024 + +# Set default Rust version +RUN asdf local rust $ROD_RUST_VERSION_2024 +RUN asdf list rust + +# ############################################################################ + +# +# Golang runtime versions +# + +# Install Golang versions +RUN asdf install golang $ROD_GOLANG_VERSION_2024 && \ + asdf global golang $ROD_GOLANG_VERSION_2024 && \ + asdf reshim golang + +# Adding labels for external usage +LABEL golang.version_2024=$ROD_GOLANG_VERSION_2024 + +# Set default Golang version +RUN asdf local golang $ROD_GOLANG_VERSION_2024 +RUN asdf list golang + +# ############################################################################ + +# +# Node.js runtime versions +# + +# Install Node.js versions +RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \ + asdf global nodejs $ROD_NODEJS_VERSION_22 && \ + asdf reshim nodejs + +# Adding labels for external usage +LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22 + +# Set default Node.js version +RUN asdf local nodejs $ROD_NODEJS_VERSION_22 +RUN asdf list nodejs + +# ############################################################################ + +# +# Ruby runtime versions +# + +# Install Ruby versions +RUN asdf install ruby $ROD_RUBY_VERSION_33 && \ + asdf global ruby $ROD_RUBY_VERSION_33 && \ + asdf reshim ruby + +# Adding labels for external usage +LABEL ruby.version_33=$ROD_RUBY_VERSION_33 + +# Set default Ruby version +RUN asdf local ruby $ROD_RUBY_VERSION_33 +RUN asdf list ruby + +# ############################################################################ + +# +# Python and PyPy runtime versions +# + +# Install Python versions +RUN asdf install python $ROD_PYTHON_VERSION_27 && \ + asdf global python $ROD_PYTHON_VERSION_27 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_310 && \ + asdf global python $ROD_PYTHON_VERSION_310 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_312 && \ + asdf global python $ROD_PYTHON_VERSION_312 && \ + asdf reshim python + +# Python2 dependencies are hardcoded because Python2 is +# deprecated. Updating them to their latest versions may raise +# incompatibility issues. +RUN asdf local python $ROD_PYTHON_VERSION_27 && \ + pip install --upgrade pip==20.3.4 && \ + pip install --upgrade setuptools==44.1.1 && \ + pip install --upgrade virtualenv==20.15.1 && \ + pip install --upgrade wheel==0.37.1 && \ + pip install --upgrade poetry==1.1.15 + +# Install Python package versions +RUN asdf local python $ROD_PYTHON_VERSION_310 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +RUN asdf local python $ROD_PYTHON_VERSION_312 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +# Adding labels for external usage +LABEL python.version_27=$ROD_PYTHON_VERSION_27 +LABEL python.version_310=$ROD_PYTHON_VERSION_310 +LABEL python.version_312=$ROD_PYTHON_VERSION_312 +LABEL python.pip=$ROD_PIP_VERSION +LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION +LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION +LABEL python.wheel=$ROD_WHEEL_VERSION +LABEL python.poetry=$ROD_POETRY_VERSION +LABEL python.west=$ROD_WEST_VERSION + +# Set default Python version +RUN asdf local python $ROD_PYTHON_VERSION_312 +RUN asdf list python + # ############################################################################ # # All architectures maintenance diff --git a/README.md b/README.md index 32a60d4..ff5b04c 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ https://github.com/docker-library/official-images), - ARMv7 32-bit (`linux/arm/v7`): https://hub.docker.com/r/arm32v7/ubuntu - ARMv8 64-bit (`linux/arm64`): https://hub.docker.com/r/arm64v8/ubuntu - RISC-V 64-bit (`linux/riscv64`): https://hub.docker.com/r/riscv64/ubuntu + - IBM POWER8 (`linux/ppc64le`): https://hub.docker.com/r/ppc64le/ubuntu ### Ubuntu system packages @@ -51,26 +52,26 @@ https://github.com/docker-library/official-images), Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: -| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | -| :------------------- | :------------------------ | :---: | :---: | :---: | :---: | -| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | **X** | -| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | | -| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | | -| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | **X** | -| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | | -| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | | -| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | | -| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | | -| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | | -| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | **X** | -| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | | -| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | | -| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | **X** | -| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | X | -| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | X | -| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | | -| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | | -| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | **X** | +| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | +| :------------------- | :------------------------ | :---: | :---: | :---: | :---: | :---: | +| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | **X** | **X** | +| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | | | +| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | | | +| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | **X** | **X** | +| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | | | +| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | | | +| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | | **X** | +| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | | | +| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | | | +| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | **X** | **X** | +| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | | | +| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | | | +| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | **X** | **X** | +| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | X | X | +| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | X | X | +| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | | | +| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | | | +| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | **X** | **X** | **bold**: default runtime environment @@ -80,18 +81,18 @@ The build of Node.js from source code fails on `linux/riscv64`! Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | -| :--------------------- | :------------------------ | :---: | :---: | :---: | :---: | -| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | X | -| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | X | -| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | X | -| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | X | -| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | X | -| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | X | -| `numpy` | | *(X)* | | | | -| `scipy` | | *(X)* | | | | -| `pandas` | | *(X)* | | | | -| `matplotlib` | | *(X)* | | | | +| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | +| :--------------------- | :------------------------ | :---: | :---: | :---: | :---: | :---: | +| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | X | X | +| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | X | X | +| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | X | X | +| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | X | X | +| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | X | X | +| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | X | X | +| `numpy` | | *(X)* | | | | | +| `scipy` | | *(X)* | | | | | +| `pandas` | | *(X)* | | | | | +| `matplotlib` | | *(X)* | | | | | *(X)*: binary only and not in PyPy (CPython only) @@ -99,17 +100,17 @@ Based on [Python Package Index](https://pypi.org/) with pip: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | -| :--------------------- | :---: | :---: | :---: | :---: | -| `pip==20.3.4` | X | X | X | X | -| `setuptools==44.1.1` | X | X | X | X | -| `virtualenv==20.15.1` | X | X | X | X | -| `wheel==0.37.1` | X | X | X | X | -| `poetry==1.1.15` | X | X | X | X | -| `numpy==1.16.6` | *(X)* | | | | -| `scipy==1.2.3` | *(X)* | | | | -| `pandas==0.24.2` | *(X)* | | | | -| `matplotlib==2.2.5` | *(X)* | | | | +| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | +| :--------------------- | :---: | :---: | :---: | :---: | :---: | +| `pip==20.3.4` | X | X | X | X | X | +| `setuptools==44.1.1` | X | X | X | X | X | +| `virtualenv==20.15.1` | X | X | X | X | X | +| `wheel==0.37.1` | X | X | X | X | X | +| `poetry==1.1.15` | X | X | X | X | X | +| `numpy==1.16.6` | *(X)* | | | | | +| `scipy==1.2.3` | *(X)* | | | | | +| `pandas==0.24.2` | *(X)* | | | | | +| `matplotlib==2.2.5` | *(X)* | | | | | *(X)*: binary only and not in PyPy (CPython only) From 51741eea322a39f236072a17dab7c4040ddd5018 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Mon, 7 Oct 2024 08:29:44 +0200 Subject: [PATCH 10/12] chore(ci): build multi-arch image for IBM z-Systems IBM z-Systems (`linux/s390x`): https://hub.docker.com/r/s390x/ubuntu Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 2 +- CONTRIBUTING.md | 2 +- Dockerfile | 123 +++++++++++++++++++++++++++ README.md | 87 +++++++++---------- 4 files changed, 169 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f366131..21af11f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -120,7 +120,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9dd90a..81b3280 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ After making changes to the ``Dockerfile``, you can build your image with: ```bash docker buildx build --tag tiacsys/readourdocs-docker-images:local \ - --platform linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le \ + --platform linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x \ --builder rod-ctn-builder --load . ``` diff --git a/Dockerfile b/Dockerfile index 550b315..d1b5be8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1222,6 +1222,129 @@ LABEL python.west=$ROD_WEST_VERSION RUN asdf local python $ROD_PYTHON_VERSION_312 RUN asdf list python +# ############################################################################ +# +# IBM z-Systems architecture maintenance +# +# ############################################################################ + +FROM base AS build-s390x + +# ############################################################################ + +# +# Rust runtime versions +# + +# Install Rust versions +RUN asdf install rust $ROD_RUST_VERSION_2024 && \ + asdf global rust $ROD_RUST_VERSION_2024 && \ + asdf reshim rust + +# Adding labels for external usage +LABEL rust.version_2024=$ROD_RUST_VERSION_2024 + +# Set default Rust version +RUN asdf local rust $ROD_RUST_VERSION_2024 +RUN asdf list rust + +# ############################################################################ + +# +# Node.js runtime versions +# + +# Install Node.js versions +RUN asdf install nodejs $ROD_NODEJS_VERSION_22 && \ + asdf global nodejs $ROD_NODEJS_VERSION_22 && \ + asdf reshim nodejs + +# Adding labels for external usage +LABEL nodejs.version_22=$ROD_NODEJS_VERSION_22 + +# Set default Node.js version +RUN asdf local nodejs $ROD_NODEJS_VERSION_22 +RUN asdf list nodejs + +# ############################################################################ + +# +# Ruby runtime versions +# + +# Install Ruby versions +RUN asdf install ruby $ROD_RUBY_VERSION_33 && \ + asdf global ruby $ROD_RUBY_VERSION_33 && \ + asdf reshim ruby + +# Adding labels for external usage +LABEL ruby.version_33=$ROD_RUBY_VERSION_33 + +# Set default Ruby version +RUN asdf local ruby $ROD_RUBY_VERSION_33 +RUN asdf list ruby + +# ############################################################################ + +# +# Python and PyPy runtime versions +# + +# Install Python versions +RUN asdf install python $ROD_PYTHON_VERSION_27 && \ + asdf global python $ROD_PYTHON_VERSION_27 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_310 && \ + asdf global python $ROD_PYTHON_VERSION_310 && \ + asdf reshim python + +RUN asdf install python $ROD_PYTHON_VERSION_312 && \ + asdf global python $ROD_PYTHON_VERSION_312 && \ + asdf reshim python + +# Python2 dependencies are hardcoded because Python2 is +# deprecated. Updating them to their latest versions may raise +# incompatibility issues. +RUN asdf local python $ROD_PYTHON_VERSION_27 && \ + pip install --upgrade pip==20.3.4 && \ + pip install --upgrade setuptools==44.1.1 && \ + pip install --upgrade virtualenv==20.15.1 && \ + pip install --upgrade wheel==0.37.1 && \ + pip install --upgrade poetry==1.1.15 + +# Install Python package versions +RUN asdf local python $ROD_PYTHON_VERSION_310 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +RUN asdf local python $ROD_PYTHON_VERSION_312 && \ + pip install --upgrade pip==$ROD_PIP_VERSION && \ + pip install --upgrade setuptools==$ROD_SETUPTOOLS_VERSION && \ + pip install --upgrade virtualenv==$ROD_VIRTUALENV_VERSION && \ + pip install --upgrade wheel==$ROD_WHEEL_VERSION && \ + pip install --upgrade poetry==$ROD_POETRY_VERSION && \ + pip install --upgrade west==$ROD_WEST_VERSION + +# Adding labels for external usage +LABEL python.version_27=$ROD_PYTHON_VERSION_27 +LABEL python.version_310=$ROD_PYTHON_VERSION_310 +LABEL python.version_312=$ROD_PYTHON_VERSION_312 +LABEL python.pip=$ROD_PIP_VERSION +LABEL python.setuptools=$ROD_SETUPTOOLS_VERSION +LABEL python.virtualenv=$ROD_VIRTUALENV_VERSION +LABEL python.wheel=$ROD_WHEEL_VERSION +LABEL python.poetry=$ROD_POETRY_VERSION +LABEL python.west=$ROD_WEST_VERSION + +# Set default Python version +RUN asdf local python $ROD_PYTHON_VERSION_312 +RUN asdf list python + # ############################################################################ # # All architectures maintenance diff --git a/README.md b/README.md index ff5b04c..b3e28dd 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ https://github.com/docker-library/official-images), - ARMv8 64-bit (`linux/arm64`): https://hub.docker.com/r/arm64v8/ubuntu - RISC-V 64-bit (`linux/riscv64`): https://hub.docker.com/r/riscv64/ubuntu - IBM POWER8 (`linux/ppc64le`): https://hub.docker.com/r/ppc64le/ubuntu + - IBM z-Systems (`linux/s390x`): https://hub.docker.com/r/s390x/ubuntu ### Ubuntu system packages @@ -52,26 +53,26 @@ https://github.com/docker-library/official-images), Based on [**asdf**](https://asdf-vm.com/) **0.14.1**: -| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | -| :------------------- | :------------------------ | :---: | :---: | :---: | :---: | :---: | -| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | **X** | **X** | -| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | | | -| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | | | -| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | **X** | **X** | -| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | | | -| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | | | -| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | | **X** | -| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | | | -| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | | | -| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | **X** | **X** | -| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | | | -| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | | | -| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | **X** | **X** | -| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | X | X | -| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | X | X | -| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | | | -| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | | | -| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | **X** | **X** | +| runtime environments | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | `linux/s390x` | +| :------------------- | :------------------------ | :---: | :---: | :---: | :---: | :---: | :---: | +| **Rust 1.81.0** | `ROD_RUST_VERSION_2024` | **X** | **X** | **X** | **X** | **X** | **X** | +| Rust 1.76.0 | `ROD_RUST_VERSION_2023` | X | | | | | | +| Rust 1.67.1 | `ROD_RUST_VERSION_2022` | X | | | | | | +| **Golang 1.23.1** | `ROD_GOLANG_VERSION_2024` | **X** | **X** | **X** | **X** | **X** | | +| Golang 1.21.13 | `ROD_GOLANG_VERSION_2023` | X | | | | | | +| Golang 1.19.13 | `ROD_GOLANG_VERSION_2022` | X | | | | | | +| **Node.js 22.9.0** | `ROD_NODEJS_VERSION_22` | **X** | **X** | **X** | | **X** | **X** | +| Node.js 20.17.0 | `ROD_NODEJS_VERSION_20` | X | | | | | | +| Node.js 18.20.4 | `ROD_NODEJS_VERSION_18` | X | | | | | | +| **Ruby 3.3.5** | `ROD_RUBY_VERSION_33` | **X** | **X** | **X** | **X** | **X** | **X** | +| Ruby 3.2.5 | `ROD_RUBY_VERSION_32` | X | | | | | | +| Ruby 3.1.6 | `ROD_RUBY_VERSION_31` | X | | | | | | +| **Python 3.12.7** | `ROD_PYTHON_VERSION_312` | **X** | **X** | **X** | **X** | **X** | **X** | +| Python 3.10.15 | `ROD_PYTHON_VERSION_310` | X | X | X | X | X | X | +| Python 2.7.18 | `ROD_PYTHON_VERSION_27` | X | X | X | X | X | X | +| PyPy 3.10-7.3.17 | `ROD_PYPY_VERSION_3` | X | | | | | | +| PyPy 2.7-7.3.17 | `ROD_PYPY_VERSION_2` | X | | | | | | +| **PyPA pipx 1.7.1** | `ROD_PIPX_VERSION` | **X** | **X** | **X** | **X** | **X** | **X** | **bold**: default runtime environment @@ -81,18 +82,18 @@ The build of Node.js from source code fails on `linux/riscv64`! Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | -| :--------------------- | :------------------------ | :---: | :---: | :---: | :---: | :---: | -| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | X | X | -| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | X | X | -| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | X | X | -| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | X | X | -| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | X | X | -| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | X | X | -| `numpy` | | *(X)* | | | | | -| `scipy` | | *(X)* | | | | | -| `pandas` | | *(X)* | | | | | -| `matplotlib` | | *(X)* | | | | | +| PyPI package name | environment variable | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | `linux/s390x` | +| :--------------------- | :------------------------ | :---: | :---: | :---: | :---: | :---: | :---: | +| `pip==24.2` | `ROD_PIP_VERSION` | X | X | X | X | X | X | +| `setuptools==75.1.0` | `ROD_SETUPTOOLS_VERSION` | X | X | X | X | X | X | +| `virtualenv==20.26.6` | `ROD_VIRTUALENV_VERSION` | X | X | X | X | X | X | +| `wheel==0.44.0` | `ROD_WHEEL_VERSION` | X | X | X | X | X | X | +| `poetry==1.8.3` | `ROD_POETRY_VERSION` | X | X | X | X | X | X | +| `west==1.2.0` | `ROD_WEST_VERSION` | X | X | X | X | X | X | +| `numpy` | | *(X)* | | | | | | +| `scipy` | | *(X)* | | | | | | +| `pandas` | | *(X)* | | | | | | +| `matplotlib` | | *(X)* | | | | | | *(X)*: binary only and not in PyPy (CPython only) @@ -100,17 +101,17 @@ Based on [Python Package Index](https://pypi.org/) with pip: Based on [Python Package Index](https://pypi.org/) with pip: -| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | -| :--------------------- | :---: | :---: | :---: | :---: | :---: | -| `pip==20.3.4` | X | X | X | X | X | -| `setuptools==44.1.1` | X | X | X | X | X | -| `virtualenv==20.15.1` | X | X | X | X | X | -| `wheel==0.37.1` | X | X | X | X | X | -| `poetry==1.1.15` | X | X | X | X | X | -| `numpy==1.16.6` | *(X)* | | | | | -| `scipy==1.2.3` | *(X)* | | | | | -| `pandas==0.24.2` | *(X)* | | | | | -| `matplotlib==2.2.5` | *(X)* | | | | | +| PyPI package name | `linux/amd64` | `linux/arm/v7` | `linux/arm64` | `linux/riscv64` | `linux/ppc64le` | `linux/s390x` | +| :--------------------- | :---: | :---: | :---: | :---: | :---: | :---: | +| `pip==20.3.4` | X | X | X | X | X | X | +| `setuptools==44.1.1` | X | X | X | X | X | X | +| `virtualenv==20.15.1` | X | X | X | X | X | X | +| `wheel==0.37.1` | X | X | X | X | X | X | +| `poetry==1.1.15` | X | X | X | X | X | X | +| `numpy==1.16.6` | *(X)* | | | | | | +| `scipy==1.2.3` | *(X)* | | | | | | +| `pandas==0.24.2` | *(X)* | | | | | | +| `matplotlib==2.2.5` | *(X)* | | | | | | *(X)*: binary only and not in PyPy (CPython only) From 2f3f75ad604a15781f9df13f28881fc76e78f6a1 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Tue, 8 Oct 2024 07:51:56 +0200 Subject: [PATCH 11/12] fix(ci)!: beeing under limit of 6 hours build time +++ CORRECT THIS AS SOON AS POSSIBLE! +++ In general, the maximum runtime of jobs in the GitHub CI workflow is limited to 6 hours and can only be increased on a customer-specific basis in the case of self-hosted runners. As long as no matrix strategy is used and therefore each platform is built separately in individual jobs, the number of platforms must be "artificially" limited. +++ CORRECT THIS AS SOON AS POSSIBLE! +++ Signed-off-by: Stephan Linz --- .github/workflows/docker-publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 21af11f..149d606 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -120,7 +120,9 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x + # HOTFIX: reduce build time to beeing under standard limit of + # 6 hours runtime ("timeout-minutes") on GitHub hosted runners. + platforms: linux/amd64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From c8fc861b879659bd8e4f8e279d84189ef83fcf38 Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Tue, 8 Oct 2024 02:54:37 +0200 Subject: [PATCH 12/12] chore: set version to 2024.10.1 Signed-off-by: Stephan Linz --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d1b5be8..48a8283 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ FROM ubuntu:noble-20240904.1 AS base LABEL mantainer="Stephan Linz " -LABEL version="unstable" +LABEL version="2024.10.1" LABEL org.opencontainers.image.vendor="TiaC Systems Network" LABEL org.opencontainers.image.authors="Stephan Linz "