This commit is contained in:
leehk 2025-04-13 08:36:14 +08:00
parent 4c503415a6
commit 4f1e842b7c

View File

@ -3,7 +3,7 @@
###########
# pull official base image
FROM python:3.11-alpine as builder
FROM python:3.11-slim-bookworm AS builder
# set working directory
@ -14,12 +14,10 @@ ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# install system dependencies
RUN apt-get update \
&& apt-get -y install build-essential \
RUN apt-get update && apt-get -y install build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# install python dependencies
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && rm -rf ~/.cache/pip
COPY ./Pipfile .
@ -37,7 +35,7 @@ COPY . /usr/src/app
#########
# pull official base image
FROM python:3.11-alpine
FROM python:3.11-slim-bookworm
# create directory for the app user
RUN mkdir -p /home/app