UserBot-1 / Dockerfile
xdragxt's picture
Update Dockerfile
3696fb9 verified
raw
history blame
742 Bytes
# Base image
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 code
COPY . .
# Ensure pip runs as root safely
ENV PIP_ROOT_USER_ACTION=ignore
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Run any setup script
RUN bash installer.sh
# Set PYTHONPATH
ENV PYTHONPATH="${PYTHONPATH}:/app"
# Start the app
CMD ["bash", "startup"]