Redefine base structure
This commit is contained in:
19
docker/Dockerfile
Normal file
19
docker/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM python:3.11-slim AS base
|
||||
WORKDIR /app
|
||||
|
||||
# Builder stage for downloading and installing packages
|
||||
FROM base AS builder
|
||||
COPY requirements.txt ./
|
||||
RUN --mount=type=cache,target=/tmp/pip_cache \
|
||||
python3 -m pip install --upgrade pip setuptools && \
|
||||
python3 -m pip install \
|
||||
-r requirements.txt \
|
||||
--extra-index-url https://www.piwheels.org/simple \
|
||||
--cache-dir /tmp/pip_cache
|
||||
|
||||
# Runtime stage for copying code and scripts
|
||||
FROM base AS runtime
|
||||
COPY --from=builder /usr/local/lib /usr/local/lib
|
||||
COPY docker/entrypoint.sh docker/uwsgi.ini ./
|
||||
COPY orebolt_prevoid/ ./
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
Reference in New Issue
Block a user