Skip to content

Commit

Permalink
Add PYTHON_DISTUTILS arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange committed May 8, 2024
1 parent bbe303b commit 304a538
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ 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_DISTUTILS=${{ (matrix.python_minor_version < 12 && '-distutils') || '-minimal' }}
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
Expand Down
6 changes: 3 additions & 3 deletions runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG BASE_TAG
FROM ${BASE_IMAGE}:${BASE_TAG}

ARG PYTHON_MINOR_VERSION
ARG PYTHON_DISTUTILS
RUN apt-install \
python3.${PYTHON_MINOR_VERSION}-distutils \
python3.${PYTHON_MINOR_VERSION}-minimal \
libpython3.${PYTHON_MINOR_VERSION}-stdlib
python3.${PYTHON_MINOR_VERSION}${PYTHON_DISTUTILS} \
python -c "print('hello world')"

0 comments on commit 304a538

Please sign in to comment.