From 9ed381141538e2f5c4a71ed0097fa30edd9c6428 Mon Sep 17 00:00:00 2001 From: Nat1anWasTaken Date: Mon, 13 May 2024 21:46:55 +0800 Subject: [PATCH] fix(Dockerfile): update Python version in base image --- Dockerfile | 62 +++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54492060..6be7aba9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,31 @@ -FROM python:3.12.3-slim as base - -ENV PYTHONDONTWRITEBYTECODE=1 - -ENV PYTHONUNBUFFERED=1 - -WORKDIR /app - -ARG UID=10001 -RUN adduser \ - --disabled-password \ - --gecos "" \ - --home "/nonexistent" \ - --shell "/sbin/nologin" \ - --no-create-home \ - --uid "${UID}" \ - appuser - -RUN apt-get update && apt-get install -y git - -RUN --mount=type=cache,target=/root/.cache/pip \ - --mount=type=bind,source=requirements.txt,target=requirements.txt \ - python -m pip install -r requirements.txt - -COPY . . - -RUN chown -R appuser:appuser /app - -USER appuser - -CMD python main.py +FROM python:3.10.9-slim as base + +ENV PYTHONDONTWRITEBYTECODE=1 + +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app + +ARG UID=10001 +RUN adduser \ + --disabled-password \ + --gecos "" \ + --home "/nonexistent" \ + --shell "/sbin/nologin" \ + --no-create-home \ + --uid "${UID}" \ + appuser + +RUN apt-get update && apt-get install -y git + +RUN --mount=type=cache,target=/root/.cache/pip \ + --mount=type=bind,source=requirements.txt,target=requirements.txt \ + python -m pip install -r requirements.txt + +COPY . . + +RUN chown -R appuser:appuser /app + +USER appuser + +CMD python main.py