Dockerfile und docker-compose angepasst wegen Zugriffsberechtigung bei Docker
This commit is contained in:
@@ -13,8 +13,12 @@ COPY main.py .
|
|||||||
COPY monitor.py .
|
COPY monitor.py .
|
||||||
COPY scheduler.py .
|
COPY scheduler.py .
|
||||||
|
|
||||||
# Erstelle Verzeichnis für Videospeicher
|
# Erstelle Non-root-User und setze Verzeichnisrechte
|
||||||
RUN mkdir -p /app/videospeicher
|
RUN useradd -u 1000 -m appuser \
|
||||||
|
&& mkdir -p /app/videospeicher \
|
||||||
|
&& chown -R appuser:appuser /app
|
||||||
|
|
||||||
|
USER appuser
|
||||||
|
|
||||||
# Setze Umgebungsvariablen
|
# Setze Umgebungsvariablen
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
container_name: camerasave-monitor
|
container_name: camerasave-monitor
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
user: "1000:1000"
|
||||||
volumes:
|
volumes:
|
||||||
- heartbeat:/app
|
- heartbeat:/app
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
Reference in New Issue
Block a user