# 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 . 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" RUN mkdir -p /app/sessions # Start the bot CMD ["bash", "startup"]