Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ใช้ Python 3.10 เป็น base image
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# ติดตั้ง dependencies ระบบ
|
5 |
+
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
6 |
+
|
7 |
+
# กำหนดโฟลเดอร์ทำงาน
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# คัดลอกไฟล์โปรเจคทั้งหมดไปยัง container
|
11 |
+
COPY . .
|
12 |
+
|
13 |
+
# ติดตั้ง Python dependencies
|
14 |
+
RUN pip install -r requirements.txt
|
15 |
+
|
16 |
+
# รันแอปพลิเคชัน
|
17 |
+
CMD ["python", "app.py"]
|