mirror of
https://github.com/norohind/FDEV-CAPI-Handler.git
synced 2026-11-22 01:56:41 +03:00
Dockerized
This commit is contained in:
1 parent
e3b8c724e3
commit
f7f40738d0
9 files changed
+77
-3
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
FROM python:3.11-slim as builder
|
||||
WORKDIR /app
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN apt update && apt install -y gcc
|
||||
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.txt
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN useradd --no-create-home --system user
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/wheels /wheels
|
||||
COPY --from=builder /app/requirements.txt .
|
||||
|
||||
RUN pip install --no-cache /wheels/*
|
||||
USER user
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
Reference in new issue
Block a user