summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2026-02-24 13:18:28 +0100
committerjerome <jerome@xlinfo.fr>2026-02-24 13:18:28 +0100
commit93febd4968ebbf0f5a90989bbe11abcaaafcdbd1 (patch)
tree27969e7c656077601e31da2b589b3031bc201f32 /Dockerfile
downloadhelloflask-93febd4968ebbf0f5a90989bbe11abcaaafcdbd1.tar.gz
helloflask-93febd4968ebbf0f5a90989bbe11abcaaafcdbd1.zip
commit initialHEADmaster
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..dccc366
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+# Stage 1: Build Stage
+FROM python:slim AS build
+COPY requirements.txt .
+RUN python -m venv /opt/venv && . /opt/venv/bin/activate && pip install --no-cache-dir -r requirements.txt
+
+# Stage 2: Run Stage
+FROM python:slim AS run
+COPY --from=build /opt/venv /opt/venv
+WORKDIR /app
+COPY app /app
+ENV PATH="/opt/venv/bin/:$PATH"
+EXPOSE 80
+CMD ["gunicorn", "--bind", "0.0.0.0:80", "app:app"]