-
Notifications
You must be signed in to change notification settings - Fork 57
/
Dockerfile
35 lines (28 loc) · 1010 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
FROM python:3.11-slim-bullseye
ENV PYTHONUNBUFFERED=1
ARG WORKDIR
ARG BUILD_DATE
ARG NAME
ARG ORG
ARG VCS_REF
ARG VENDOR
ARG VERSION
WORKDIR $WORKDIR
COPY requirements.txt .
RUN mkdir -p venvs
RUN python3 -m venv venvs/$NAME
RUN venvs/$NAME/bin/pip install --upgrade pip
RUN venvs/$NAME/bin/pip install -r requirements.txt
COPY templates/ ./templates/
COPY *.py ./
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$NAME \
org.label-schema.description="A Python script that aggregates recent popular tweets from your Mastodon timeline " \
org.label-schema.url="https://github.com/${ORG}/${NAME}" \
org.label-schema.vcs-url="https://github.com/${ORG}/${NAME}" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor=$VENDOR \
org.label-schema.version=$VERSION \
org.label-schema.docker.schema-version="1.0" \
org.label-schema.docker.cmd="docker run ${ORG}/${NAME}"
ENTRYPOINT ["venvs/mastodon_digest/bin/python3", "run.py"]