# Gunakan base image Python versi 3.10.10 | |
FROM python:3.10.10 | |
# Set working directory di dalam kontainer | |
WORKDIR /app | |
# Salin file requirements.txt dan install dependencies | |
COPY requirements.txt requirements.txt | |
RUN pip install -r requirements.txt | |
# Salin file utama aplikasi Flask dan direktori templates | |
COPY app.py . | |
COPY templates/index.html | |
# Command untuk menjalankan aplikasi Flask ketika kontainer dimulai | |
CMD ["python", "app.py"] | |