forked from infinityofspace/certbot_dns_porkbun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (21 loc) · 956 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
FROM python:3.11-alpine3.17 AS build-image
RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev cargo git \
&& if [[ $(uname -m) == armv6* || $(uname -m) == armv7* ]]; then \
mkdir -p ~/.cargo/registry/index \
&& cd ~/.cargo/registry/index \
&& git clone --bare https://github.com/rust-lang/crates.io-index.git github.jparrowsec.cn-1285ae84e5963aae; \
fi
# workaround for cryptography arm build issue: see https://github.com/pyca/cryptography/issues/6673
WORKDIR /certbot_dns_porkbun
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN pip install .
FROM python:3.11-alpine3.17
COPY --from=build-image /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
ENTRYPOINT ["certbot"]
LABEL org.opencontainers.image.source="https://github.com/infinityofspace/certbot_dns_porkbun"
LABEL org.opencontainers.image.licenses="MIT"