From 9d41a6d24ef951ebc7767612e127351485b65dfc Mon Sep 17 00:00:00 2001 From: Lev Date: Sat, 6 Nov 2021 21:26:15 +0300 Subject: [PATCH] Fix Python version for v12 --- build/frappe-nginx/Dockerfile | 3 ++- build/frappe-worker/Dockerfile | 3 ++- docker-bake.hcl | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/frappe-nginx/Dockerfile b/build/frappe-nginx/Dockerfile index 3b0656ce..5a2f4c44 100644 --- a/build/frappe-nginx/Dockerfile +++ b/build/frappe-nginx/Dockerfile @@ -2,7 +2,8 @@ # This is done to ensures that node-sass binary remains common. # node-sass is required to enable website theme feature used # by Website Manager role in Frappe Framework -FROM python:3.9-slim-bullseye +ARG PYTHON_VERSION=3.9 +FROM python:${PYTHON_VERSION}-slim-bullseye ARG GIT_REPO=https://github.com/frappe/frappe ARG GIT_BRANCH=develop diff --git a/build/frappe-worker/Dockerfile b/build/frappe-worker/Dockerfile index f803b085..3bc735c1 100644 --- a/build/frappe-worker/Dockerfile +++ b/build/frappe-worker/Dockerfile @@ -1,4 +1,5 @@ -FROM python:3.9-slim-bullseye +ARG PYTHON_VERSION=3.9 +FROM python:${PYTHON_VERSION}-slim-bullseye # Add non root user without password RUN useradd -ms /bin/bash frappe diff --git a/docker-bake.hcl b/docker-bake.hcl index 8f05ac72..43a9a460 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -49,6 +49,7 @@ target "stable-args" { args = { GIT_BRANCH = "${GIT_BRANCH}" IMAGE_TAG = "${GIT_BRANCH}" + PYTHON_VERSION = "${VERSION}" == "12" ? "3.7" : "3.9" } }