Update Dockerfile
Browse files- Dockerfile +12 -5
Dockerfile
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
-
#
|
|
|
|
|
|
|
|
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# Set timezone
|
@@ -13,21 +17,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
13 |
# Set working directory
|
14 |
WORKDIR /app
|
15 |
|
16 |
-
# Copy bot source
|
17 |
COPY . .
|
18 |
|
19 |
-
#
|
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
|
27 |
RUN bash installer.sh
|
28 |
|
|
|
|
|
|
|
29 |
# Set PYTHONPATH
|
30 |
ENV PYTHONPATH="${PYTHONPATH}:/app"
|
31 |
|
32 |
-
# Start the
|
33 |
CMD ["bash", "startup"]
|
|
|
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
|
|
|
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 |
+
# Create writable session directory for Telethon
|
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"]
|