From ba0e62c61cbe8971be05cff3d25c0b43726fa2bf Mon Sep 17 00:00:00 2001 From: Arnav Choudhury Date: Thu, 17 Sep 2020 10:08:52 +0530 Subject: [PATCH] Made maintaing and updating the python version easier by using build args --- .../compose/local/docs/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index f6badd1f4..ccbc9f009 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,5 +1,10 @@ +ARG PYTHON_VERSION=3.8-slim-buster + +# define an alias for the specfic python version used in this file. +FROM python:${PYTHON_VERSION} as python + # Python build stage -FROM python:3.8-slim-buster as python-build-stage +FROM python as python-build-stage ENV PYTHONDONTWRITEBYTECODE 1 @@ -25,7 +30,7 @@ RUN pip wheel --no-cache-dir --no-deps --use-feature=2020-resolver --wheel-dir / # Python 'run' stage -FROM python:3.8-slim-buster as python-run-stage +FROM python as python-run-stage ARG BUILD_ENVIRONMENT ENV PYTHONUNBUFFERED 1