xdragxt commited on
Commit
331e7ca
·
verified ·
1 Parent(s): 9a1232a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -41
Dockerfile CHANGED
@@ -1,49 +1,15 @@
1
  FROM python:3.10-slim
2
 
3
- # Set timezone
4
- ENV TZ=Asia/Kolkata
5
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
6
 
7
- # Install required system packages
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
- gdb \
10
- git \
11
- gcc \
12
- python3-dev \
13
  ffmpeg \
14
- mediainfo \
15
- neofetch && \
16
- apt-get clean && rm -rf /var/lib/apt/lists/*
17
-
18
- # Set working directory
19
- WORKDIR /app
20
-
21
- # Copy project files
22
- COPY . .
23
-
24
- # Avoid pip permission issues
25
- ENV PIP_ROOT_USER_ACTION=ignore
26
-
27
- # Install Python dependencies
28
- RUN pip install --upgrade pip && \
29
- pip install --no-cache-dir -r requirements.txt
30
-
31
- # (Optional) Skip or modify if installer.sh fails
32
- RUN [ -f installer.sh ] && bash installer.sh || true
33
-
34
- # Fix Git ownership warning
35
- RUN git config --system --add safe.directory /app
36
-
37
- # Set folder permissions
38
- RUN mkdir -p /app/sessions /app/resources/auth /app/tmp /app/pdf && \
39
- chmod -R 777 /app/sessions /app/resources /app/tmp /app/pdf
40
 
41
- # Set PYTHONPATH
42
- ENV PYTHONPATH="${PYTHONPATH}:/app"
43
 
44
- # Copy entrypoint
45
- COPY entrypoint.sh /app/entrypoint.sh
46
- RUN chmod +x /app/entrypoint.sh
47
 
48
- # Run the bot/server
49
- CMD ["/app/entrypoint.sh"]
 
1
  FROM python:3.10-slim
2
 
3
+ WORKDIR /app
 
 
4
 
5
+ # Install required tools
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
 
 
 
7
  ffmpeg \
8
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
+ COPY requirements.txt .
11
+ RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
12
 
13
+ COPY server.py .
 
 
14
 
15
+ CMD ["python3", "server.py"]