Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
# Installiere Abhängigkeiten
|
6 |
+
COPY requirements.txt .
|
7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
+
|
9 |
+
# Kopiere den App-Code
|
10 |
+
COPY app.py .
|
11 |
+
|
12 |
+
# Port freigeben
|
13 |
+
EXPOSE 7860
|
14 |
+
|
15 |
+
# Umgebungsvariablen setzen
|
16 |
+
ENV HOST=0.0.0.0
|
17 |
+
ENV PORT=7860
|
18 |
+
|
19 |
+
# Start-Kommando
|
20 |
+
CMD ["python", "app.py"]
|