File tree Expand file tree Collapse file tree
docker-compose-data/webdock-ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ RUN apt-get update && \
1717 apt-get install -y docker-ce-cli && \
1818 rm -rf /var/lib/apt/lists/*
1919
20+ # Erstelle Docker-Gruppe und füge Benutzer hinzu
21+ RUN groupadd -g 999 docker && \
22+ useradd -r -u 999 -g docker webdock
23+
2024# Python-Abhängigkeiten
2125COPY requirements.txt .
2226RUN pip install --no-cache-dir -r requirements.txt
@@ -40,8 +44,9 @@ COPY docker-compose-files/ /app/docker-compose-files/
4044COPY docker-compose-files/webdock-ui/src/static/img/icons/* /app/static/img/icons/
4145
4246# Setze Berechtigungen
43- RUN chmod -R 755 /app
44- RUN chown -R root:root /app
47+ RUN chmod -R 755 /app && \
48+ chown -R webdock:docker /app && \
49+ chmod 666 /var/run/docker.sock || true
4550
4651# Setze Umgebungsvariablen
4752ENV FLASK_APP=app.py
@@ -55,5 +60,8 @@ EXPOSE 80
5560HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
5661 CMD curl -f http://localhost/test || exit 1
5762
63+ # Wechsle zum webdock Benutzer
64+ USER webdock
65+
5866# Starte die Flask-App
5967CMD ["python3" , "/app/app.py" ]
Original file line number Diff line number Diff line change @@ -11,4 +11,5 @@ services:
1111 - ./config:/app/config
1212 environment :
1313 - CONFIG_DIR=/app/config
14+ - DOCKER_GID=999
1415 restart : unless-stopped
You can’t perform that action at this time.
0 commit comments