Files
very-bad-bot/Dockerfile

42 lines
1.1 KiB
Docker

# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/go/dockerfile-reference/
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7
ARG PYTHON_VERSION=3.11.5
FROM ubuntu:latest AS base
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1
# Set timezone in the container
ENV TZ="America/Detroit"
WORKDIR /app
# update package list
RUN apt-get update
# install python, pipx
RUN apt-get install -y wget python3 pipx
# Copy the source code into the container.
COPY . .
# install poetry via pipx
RUN pipx install poetry && pipx ensurepath
RUN ~/.local/bin/poetry install
# Expose the port that the application listens on.
EXPOSE 8000
CMD ~/.local/bin/poetry run python src/bot_core.py database.ini discord.token 1128111628471255050 1441504341797371996