From e33a83c06380d999f180c2f3529a9f2e024f7724 Mon Sep 17 00:00:00 2001 From: shaver007 Date: Sat, 1 Nov 2025 23:01:38 +0200 Subject: [PATCH] chore:Dockerfile - set base image, python, Flask app setup --- Dockerfile | 19 +++++++++++++++++++ requirements.txt | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..4e20cfb5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:22.04 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + python3 python3-pip \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt /tmp/requirements.txt +RUN pip install --upgrade pip \ + && pip install --no-cache-dir -r /tmp/requirements.txt + +COPY /app /app +WORKDIR /app + +RUN useradd appuser \ + && chown -R appuser:appuser /app +USER appuser + +CMD ["python3", "app.py"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..134fc824 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +flask==3.0.0 ; python_version >= "3.10" and python_version < "4.0" +itsdangerous==2.1.2 ; python_version >= "3.10" and python_version < "4.0" +jinja2==3.1.2 ; python_version >= "3.10" and python_version < "4.0" +markupsafe==2.1.3 ; python_version >= "3.10" and python_version < "4.0" +werkzeug==3.0.0 ; python_version >= "3.10" and python_version < "4.0" \ No newline at end of file