# Use Python 3 base image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies for audio support
RUN apt-get update && apt-get install -y \
python3-pip \
libopus0 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY /scripts/requirements.txt .
# Install required packages from requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the bot script and system prompt
COPY /scripts/discordbot.py .
COPY /scripts/system_prompt.txt .
# Run the bot on container start
CMD ["python", "discordbot.py"]