-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (16 loc) · 648 Bytes
/
Dockerfile
File metadata and controls
19 lines (16 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.15.0a6-alpine
LABEL org.opencontainers.image.source=https://github.com/tomswartz07/AdventOfCodeLeaderboard
LABEL org.opencontainers.image.authors="tom+docker@tswartz.net"
LABEL description="Docker container to run a Slack bot which posts daily \
updates on the Advent of Code leaderboard."
COPY crontab .
RUN crontab crontab
COPY leaderboard.py .
COPY requirements.txt .
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
CMD [ "crond", "-f" ]
HEALTHCHECK CMD ps aux | grep '[c]ron' || exit 1