From f1bbf942f8f37f94592b3e21375aee4fdd64fc3b Mon Sep 17 00:00:00 2001 From: Lucas Roesler <roesler.lucas@gmail.com> Date: Sun, 23 Apr 2023 15:34:14 +0200 Subject: [PATCH] feat: support build arg to pin the python3 version Add a build arg to the python3 templates so that developers can pin the python version. Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com> --- template/python3-debian/Dockerfile | 3 ++- template/python3/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/template/python3-debian/Dockerfile b/template/python3-debian/Dockerfile index 225872ab..28f7fdc0 100644 --- a/template/python3-debian/Dockerfile +++ b/template/python3-debian/Dockerfile @@ -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 diff --git a/template/python3/Dockerfile b/template/python3/Dockerfile index 420933a1..a399cb14 100644 --- a/template/python3/Dockerfile +++ b/template/python3/Dockerfile @@ -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