-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 814 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Use Python 3.9.13 as the base image
FROM python:3.9.13-slim
# Set environment variables
ENV DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
ENV WEBHOOK_ID=${WEBHOOK_ID}
ENV PYTHONPATH=/app
# Set the working directory
WORKDIR /app
# Install necessary system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libffi-dev \
libssl-dev \
python3-dev \
ffmpeg && rm -rf /var/lib/apt/lists/*
# Upgrade pip to the latest version
RUN pip install --upgrade pip
# Copy requirements file
COPY pip_requirements.txt requirements.txt
# Install Python dependencies
RUN pip install -r requirements.txt
# Copy the bot code
COPY . /app
# Expose any ports if necessary (Discord bots don't need it, but for debug purposes)
EXPOSE 8080
# Command to run the bot
CMD ["python", "src/bot.py"]