UserBot-1 / Dockerfile
xdragxt's picture
Update Dockerfile
11af8d9 verified
raw
history blame
1.09 kB
# Ultroid - UserBot
# Copyright (C) 2021-2025 TeamUltroid
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# Please read the GNU Affero General Public License in <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
FROM python:3.10-slim
# Set timezone
ENV TZ=Asia/Kolkata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git gcc python3-dev ffmpeg mediainfo neofetch && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy bot source
COPY . .
# Allow pip to run as root without warnings
ENV PIP_ROOT_USER_ACTION=ignore
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Run installer script
RUN bash installer.sh
# Create writable session directory for Telethon
RUN mkdir -p /app/sessions && chmod -R 777 /app/sessions
# Set PYTHONPATH
ENV PYTHONPATH="${PYTHONPATH}:/app"
# Start the bot
CMD ["bash", "startup"]