-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (22 loc) · 939 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
ARG PY_VERSION="3.11.3"
ARG DEB_VERSION="bullseye"
FROM python:${PY_VERSION}-${DEB_VERSION} as builder
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /
COPY requirements.txt /
SHELL ["/bin/bash", "-c", "-o", "pipefail"]
RUN python -m venv /venv &&\
/venv/bin/pip install --no-cache-dir -r /requirements.txt
COPY ss2pl /venv/ss2pl/
FROM python:${PY_VERSION}-slim-${DEB_VERSION}
LABEL org.opencontainers.image.title="SS2PL"
LABEL org.opencontainers.image.description="SiteShield 2 PrefixList"
LABEL org.opencontainers.image.vendor="Vlad Vasiliu"
LABEL org.opencontainers.image.source="https://github.com/vladvasiliu/ss2pl"
LABEL org.opencontainers.image.authors="Vlad Vasiliu"
LABEL org.opencontainers.image.url="https://github.com/vladvasiliu/ss2pl"
LABEL org.opencontainers.image.licenses="BSD-3-Clause"
COPY --from=builder /venv /venv
WORKDIR /venv
CMD ["/venv/bin/python","-m","ss2pl"]