Files
infoscreen/server/Dockerfile.dev
olaf 7f4800496a implement functionality to delete clients in
clients and SetupMode components
2025-07-22 16:04:26 +00:00

49 lines
1.2 KiB
Docker

# Datei: server/Dockerfile.dev
# Entwicklungs-Dockerfile für die API (Flask + SQLAlchemy)
FROM python:3.13-slim
# Build args für UID/GID
ARG USER_ID=1000
ARG GROUP_ID=1000
# Erstelle non-root User
RUN apt-get update \
&& apt-get install -y --no-install-recommends locales curl \
&& groupadd -g ${GROUP_ID} infoscreen_taa \
&& useradd -u ${USER_ID} -g ${GROUP_ID} --shell /bin/bash --create-home infoscreen_taa \
&& sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=de_DE.UTF-8 \
LANGUAGE=de_DE:de \
LC_ALL=de_DE.UTF-8
# Arbeitsverzeichnis
WORKDIR /app
# Kopiere nur Requirements für schnellen Rebuild
COPY requirements.txt ./
COPY requirements-dev.txt ./
# Installiere Python-Abhängigkeiten (Prod + Dev)
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir -r requirements-dev.txt
# Expose Ports für Flask API
EXPOSE 8000
EXPOSE 5678
# Setze Env für Dev
ENV FLASK_ENV=development
ENV ENV_FILE=.env
# Wechsle zum non-root User
USER infoscreen_taa
# Default Command: Flask Development Server
CMD ["python", "-m", "debugpy", "--listen", "0.0.0.0:5678", "wsgi.py"]
# CMD ["sleep", "infinity"]