From 5e8bebbeb1c0bfdb57b76ff61f5c2b6b034c3e06 Mon Sep 17 00:00:00 2001 From: Jon Date: Sat, 10 Aug 2024 17:22:07 +0930 Subject: [PATCH] build(python): update installed packages as part of the build #209 --- dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index f9785ce0..45d9d6b1 100644 --- a/dockerfile +++ b/dockerfile @@ -5,6 +5,11 @@ ARG CI_COMMIT_TAG='' FROM python:3.11-alpine3.19 as build +RUN pip --disable-pip-version-check list --outdated --format=json | \ + python -c "import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))" | \ + xargs -n1 pip install --no-cache-dir -U; + + RUN apk add --update \ bash \ git \ @@ -83,7 +88,10 @@ COPY --from=build /tmp/python_builds /tmp/python_builds COPY includes/ / -RUN apk update --no-cache; \ +RUN pip --disable-pip-version-check list --outdated --format=json | \ + python -c "import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))" | \ + xargs -n1 pip install --no-cache-dir -U; \ + apk update --no-cache; \ apk add --no-cache \ mariadb-client \ mariadb-dev \