Files
Mysteryhelfer-web/Dockerfile
tebarius 6bac7839d3 release 1.0.0
- bump python-version to 3.14
- bump streamlit to 1.52.2
- bump numpy to 2.4.0
- extra-script for generating special-wb's
- rework of container to use a python-virtual-environment and create the special-wb's at first start of the container (no longer at first web-request)
- adding links to source-code and docker-registry's in welcome-message
- some more error-handling for ADFG(V)X
2025-12-25 18:52:23 +01:00

41 lines
1.3 KiB
Docker

# Copyright (c) 2025 Martin Kayser (tebarius)
# Licensed under the MIT License. See LICENSE file in the project root.
ARG PYTHON_VERSION="3.14"
FROM python:${PYTHON_VERSION}-slim
LABEL authors="tebarius"
LABEL description="tebarius Mysteryhelfer web"
ARG PYTHON_VERSION
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PATH="/myst-venv/bin:$PATH"
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN python -m venv /myst-venv \
&& python -m pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
COPY ./app /app
# ein bisschen Patchen um auch beim Bookmarken oder Versenden der Webadresse per Messenger den richtigen Titel und das
# richtige Favicon zu verwenden/sehen
COPY ./app/images/favicon.ico /myst-venv/lib/python${PYTHON_VERSION}/site-packages/streamlit/static/favicon.ico
RUN sed -i -e 's|favicon\.png|favicon.ico|' \
-e 's|<title>.*</title>|<title>tebarius Mysteryhelfer (web)</title>|' \
/myst-venv/lib/python${PYTHON_VERSION}/site-packages/streamlit/static/index.html \
&& useradd -m -u 1000 myst \
&& chown -R myst:myst /app
USER myst
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["/bin/bash", "entrypoint.sh"]