initial commit 0333222
Browse files- Dockerfile +12 -1
Dockerfile
CHANGED
@@ -16,7 +16,18 @@ RUN apt-get update && apt-get install -y \
|
|
16 |
# Install Python dependencies
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
# Expose the port used by Flask
|
22 |
EXPOSE 7860
|
|
|
16 |
# Install Python dependencies
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
+
# Créer le répertoire `static` s'il n'existe pas
|
20 |
+
RUN mkdir -p /app/tmp
|
21 |
+
|
22 |
+
# Modifier les permissions pour autoriser l'écriture
|
23 |
+
RUN chmod -R 777 /app/tmp
|
24 |
+
|
25 |
+
# Ajouter un utilisateur non-root (facultatif)
|
26 |
+
RUN useradd -ms /bin/bash appuser
|
27 |
+
RUN chown -R appuser:appuser /app
|
28 |
+
|
29 |
+
# Passer à l'utilisateur non-root
|
30 |
+
USER appuser
|
31 |
|
32 |
# Expose the port used by Flask
|
33 |
EXPOSE 7860
|