alertbot/Dockerfile

16 lines
557 B
Docker
Raw Normal View History

2023-11-01 23:46:23 +01:00
FROM python:3.11-alpine
2021-04-01 16:17:54 +02:00
LABEL description="A Matrix bot for Alertmanager"
# Instal gcc to build wheels
RUN apk add --no-cache gcc musl-dev
# Force the stdout and stderr streams to be unbuffered
ENV PYTHONUNBUFFERED 1
# Install requirements from PyPI
COPY requirements.txt /var/www/alertbot/
RUN pip install --no-cache-dir -r /var/www/alertbot/requirements.txt
# Copy the all the necessary files
COPY . /var/www/alertbot/
# Move the rigth directory
WORKDIR /var/www/alertbot
EXPOSE 8000
2021-04-01 17:10:57 +02:00
ENTRYPOINT python3 /var/www/alertbot/bot.py --host=0.0.0.0 --port=8000