Update Dockerfile
Browse files- Dockerfile +2 -15
Dockerfile
CHANGED
@@ -1,40 +1,27 @@
|
|
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 system dependencies
|
13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
14 |
git gcc python3-dev ffmpeg mediainfo neofetch && \
|
15 |
apt-get clean && rm -rf /var/lib/apt/lists/*
|
16 |
|
17 |
-
# Set working directory
|
18 |
WORKDIR /app
|
19 |
|
20 |
-
# Copy bot source
|
21 |
COPY . .
|
22 |
|
23 |
-
# Allow pip to run as root without warnings
|
24 |
ENV PIP_ROOT_USER_ACTION=ignore
|
25 |
|
26 |
-
# Install Python dependencies
|
27 |
RUN pip install --upgrade pip
|
28 |
RUN pip install --no-cache-dir -r requirements.txt
|
29 |
|
30 |
-
# Run installer script
|
31 |
RUN bash installer.sh
|
32 |
|
33 |
-
#
|
34 |
RUN mkdir -p /app/sessions && chmod -R 777 /app/sessions
|
|
|
35 |
|
36 |
-
# Set PYTHONPATH
|
37 |
ENV PYTHONPATH="${PYTHONPATH}:/app"
|
38 |
|
39 |
-
# Start the bot
|
40 |
CMD ["bash", "startup"]
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
3 |
ENV TZ=Asia/Kolkata
|
4 |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
5 |
|
|
|
6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
7 |
git gcc python3-dev ffmpeg mediainfo neofetch && \
|
8 |
apt-get clean && rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
|
|
|
12 |
COPY . .
|
13 |
|
|
|
14 |
ENV PIP_ROOT_USER_ACTION=ignore
|
15 |
|
|
|
16 |
RUN pip install --upgrade pip
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
|
|
19 |
RUN bash installer.sh
|
20 |
|
21 |
+
# Ensure sessions and resources directories exist and are writable
|
22 |
RUN mkdir -p /app/sessions && chmod -R 777 /app/sessions
|
23 |
+
RUN mkdir -p /app/resources/auth && chmod -R 777 /app/resources
|
24 |
|
|
|
25 |
ENV PYTHONPATH="${PYTHONPATH}:/app"
|
26 |
|
|
|
27 |
CMD ["bash", "startup"]
|