UserBot-1 / Dockerfile
xdragxt's picture
Update Dockerfile
462a607 verified
raw
history blame
893 Bytes
FROM python:3.10-slim
ENV TZ=Asia/Kolkata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
git \
gcc \
python3-dev \
ffmpeg \
mediainfo \
neofetch && \
apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
ENV PIP_ROOT_USER_ACTION=ignore
# Install Python dependencies
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Run custom installer script
RUN bash installer.sh
# Fix Git safe directory error
RUN git config --global --add safe.directory /app
# Ensure writable directories
RUN mkdir -p /app/sessions /app/resources/auth /app/tmp /app/pdf && \
chmod -R 777 /app/sessions /app/resources /app/tmp /app/pdf
ENV PYTHONPATH="${PYTHONPATH}:/app"
CMD ["bash", "startup"]