-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 922 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (19 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 1. Base image ko update kiya (Node 20 use karne se naya Debian milega aur apt-get fail nahi hoga)
FROM nikolaik/python-nodejs:python3.10-nodejs20
# 2. System dependencies install karna
# Naye base image mein purani lists remove karne ki zaroorat nahi padegi
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg aria2 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app/
# 3. Pehle sirf requirements.txt copy karein (Caching Optimization)
# Isse baar-baar code change karne par pip install wapas se run nahi hoga aur build fast hoga
COPY requirements.txt .
# 4. Python packages install karna
RUN python -m pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --upgrade -r requirements.txt
# 5. Ab baaki ka poora code copy karein
COPY . .
# 6. CMD ko JSON array format mein likha (tumhare pichle logs mein iski warning thi)
CMD ["bash", "start"]