-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 766 Bytes
/
Copy pathDockerfile
File metadata and controls
24 lines (17 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM alpine:latest
RUN addgroup -S certbot -g 1000 \
&& adduser -SD certbot -h /etc/letsencrypt -u 1000 -G certbot
COPY entrypoint.sh /entrypoint.sh
COPY renew.sh /renew.sh
COPY crontab.conf /crontab.conf
RUN chmod +x /renew.sh \
&& chmod +x /entrypoint.sh \
&& crontab -u certbot /crontab.conf
RUN apk add busybox-openrc sudo \
&& apk add musl-dev gcc libffi-dev python3-dev \
&& apk add py3-pip && pip install --upgrade --break-system-packages pip \
&& pip install --break-system-packages certbot certbot-dns-cloudflare \
&& apk del musl-dev gcc libffi-dev python3-dev
RUN mkdir -p /var/log/letsencrypt /var/lib/letsencrypt /certs \
&& chown -R certbot:certbot /etc/letsencrypt /var/lib/letsencrypt /var/log/letsencrypt /certs
ENTRYPOINT ["/entrypoint.sh"]