-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdiscord-bot.Dockerfile
More file actions
28 lines (20 loc) · 910 Bytes
/
Copy pathdiscord-bot.Dockerfile
File metadata and controls
28 lines (20 loc) · 910 Bytes
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
# Use the official Python image as the base image
FROM python
# Define build-time variables for the bot token and guild IDs
ARG MAJOR_BOT_TOKEN
ARG MAJOR_BOT_GUILDS
# Update the package list
RUN apt update
# Install cmake, which may be required for building some Python packages
RUN apt install -y cmake
# Install Python dependencies using pip
RUN pip install matplotlib pandas disnake
# Copy the current directory (where the Dockerfile is located) into the image at /majority-judgement
COPY . /majority-judgement
# Set environment variables inside the container using the values from build arguments
ENV MAJOR_BOT_TOKEN=${MAJOR_BOT_TOKEN}
ENV MAJOR_BOT_GUILDS=${MAJOR_BOT_GUILDS}
# Set the working directory to where your bot's main script is located
WORKDIR /majority-judgement/discord-bot
# Define the command to run your bot when the container starts
CMD ["/usr/local/bin/python3", "major_bot.py"]