Skip to content

Commit

Permalink
feat: support build arg to pin the python3 version
Browse files Browse the repository at this point in the history
Add a build arg to the python3 templates so that developers can pin the
python version.

Signed-off-by: Lucas Roesler <[email protected]>
  • Loading branch information
LucasRoesler authored and alexellis committed May 10, 2023
1 parent 1d0ab13 commit f1bbf94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion template/python3-debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG PYTHON_VERSION=3
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.2.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:3
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}

ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down
3 changes: 2 additions & 1 deletion template/python3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG PYTHON_VERSION=3
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.2.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:3-alpine
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-alpine

ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down

0 comments on commit f1bbf94

Please sign in to comment.