xdragxt commited on
Commit
3696fb9
·
verified ·
1 Parent(s): d26f573

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -18
Dockerfile CHANGED
@@ -1,27 +1,33 @@
1
- # Ultroid - UserBot
2
- # Copyright (C) 2021-2025 TeamUltroid
3
- # This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
4
- # PLease read the GNU Affero General Public License in <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
5
 
6
- FROM python:3.10-slim
 
 
7
 
8
- # set timezone
9
- ENV TZ=Asia/Kolkata
10
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 
11
 
12
- # Install all system dependencies
13
- RUN apt-get update && apt-get install -y git gcc python3-dev ffmpeg mediainfo neofetch
14
 
15
- USER root
 
16
 
17
- WORKDIR /app
 
18
 
19
- COPY . .
 
 
20
 
21
- ENV PIP_ROOT_USER_ACTION=ignore
22
- RUN pip install --no-cache-dir -r requirements.txt
23
- RUN bash installer.sh
24
 
25
- ENV PYTHONPATH="${PYTHONPATH}:/app"
 
26
 
27
- CMD ["bash", "startup"]
 
 
1
+ # Base image
2
+ FROM python:3.10-slim
 
 
3
 
4
+ # Set timezone
5
+ ENV TZ=Asia/Kolkata
6
+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
7
 
8
+ # Install system dependencies
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ git gcc python3-dev ffmpeg mediainfo neofetch && \
11
+ apt-get clean && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Set working directory
14
+ WORKDIR /app
15
 
16
+ # Copy bot source code
17
+ COPY . .
18
 
19
+ # Ensure pip runs as root safely
20
+ ENV PIP_ROOT_USER_ACTION=ignore
21
 
22
+ # Install Python dependencies
23
+ RUN pip install --upgrade pip
24
+ RUN pip install --no-cache-dir -r requirements.txt
25
 
26
+ # Run any setup script
27
+ RUN bash installer.sh
 
28
 
29
+ # Set PYTHONPATH
30
+ ENV PYTHONPATH="${PYTHONPATH}:/app"
31
 
32
+ # Start the app
33
+ CMD ["bash", "startup"]