From d45e680a3275bb8402b35f18ef36d4dd2e3cd21b Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Tue, 7 May 2024 12:14:43 +0200 Subject: [PATCH] Fix missing distutils in runtime <= 3.11 (#18) --- .github/workflows/build.yml | 3 ++- runtime/Dockerfile | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 303d59c..e3ecb76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -120,10 +120,11 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # run PRs with BASE_TAG master because base won't be pushed + # on python_minor_version < 12, apt-install python3.x-distutils (used to be part of stdlib) instead of apt-install python3.x build-args: | BASE_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/base BASE_TAG=${{ github.event_name != 'pull_request' && github.sha || 'master' }} - PYTHON_MINOR_VERSION=${{ matrix.python_minor_version }} + PYTHON_MINOR_VERSION=${{ matrix.python_minor_version }}${{ (matrix.python_minor_version < 12 && '-distutils') || '' }} cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.image }}:${{ (startsWith(matrix.image, 'runtime') && format('3.{0}-', matrix.python_minor_version)) || '' }}buildcache cache-to: ${{ github.event_name != 'pull_request' && env.CACHE_TO_STRING || '' }} provenance: false diff --git a/runtime/Dockerfile b/runtime/Dockerfile index ef2631c..ecdd48b 100644 --- a/runtime/Dockerfile +++ b/runtime/Dockerfile @@ -4,6 +4,4 @@ ARG BASE_TAG FROM ${BASE_IMAGE}:${BASE_TAG} ARG PYTHON_MINOR_VERSION -RUN apt-install \ - python3.${PYTHON_MINOR_VERSION}-minimal \ - libpython3.${PYTHON_MINOR_VERSION}-stdlib +RUN apt-install python3.${PYTHON_MINOR_VERSION}