Omkar1806 commited on
Commit
9196eca
·
verified ·
1 Parent(s): 270849c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,19 +1,21 @@
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
- # Requirements install
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
- # Sab kuch copy karo
10
- COPY . .
 
11
 
12
- # Logs mein check karne ke liye ki files kahan hain
13
- RUN ls -R
14
 
15
- # Path fix
16
  ENV PYTHONPATH=/app
17
 
18
- # Force fully path dena
19
  CMD ["python", "app.py"]
 
1
  FROM python:3.9-slim
2
 
3
+ # 1. Directory set karein
4
  WORKDIR /app
5
 
6
+ # 2. Requirements copy karke install karein
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ # 3. Sabse zaroori: Sari files ko current directory se /app mein copy karein
11
+ # '.' ka matlab hai aapka sara local code, '/app/' ka matlab container ke andar ka folder
12
+ COPY . /app/
13
 
14
+ # 4. Permissions check (Optional but safe)
15
+ RUN chmod +x /app/app.py
16
 
17
+ # 5. PYTHONPATH set karein taaki env.py ko app.py dhoond sake
18
  ENV PYTHONPATH=/app
19
 
20
+ # 6. Command ko fixed path ke saath chalayein
21
  CMD ["python", "app.py"]