Commit
β’
f428ac8
1
Parent(s):
96b9c70
Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
@@ -1,15 +1,16 @@
|
|
|
|
1 |
FROM python:3.10.10
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
COPY requirements.txt requirements.txt
|
6 |
RUN pip install -r requirements.txt
|
7 |
|
8 |
-
#
|
9 |
-
COPY
|
10 |
-
|
11 |
-
βββ requirements.txt # File requirements untuk dependencies
|
12 |
-
βββ templates/ # Direktori untuk menyimpan template HTML
|
13 |
-
βββ index.html
|
14 |
|
|
|
15 |
CMD ["python", "app.py"]
|
|
|
1 |
+
# Gunakan base image Python versi 3.10.10
|
2 |
FROM python:3.10.10
|
3 |
|
4 |
+
# Set working directory di dalam kontainer
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Salin file requirements.txt dan install dependencies
|
8 |
COPY requirements.txt requirements.txt
|
9 |
RUN pip install -r requirements.txt
|
10 |
|
11 |
+
# Salin file utama aplikasi Flask dan direktori templates
|
12 |
+
COPY app.py .
|
13 |
+
COPY templates/ templates/
|
|
|
|
|
|
|
14 |
|
15 |
+
# Command untuk menjalankan aplikasi Flask ketika kontainer dimulai
|
16 |
CMD ["python", "app.py"]
|