Skip to content

Commit 40ff6cd

Browse files
Move certbot installation to requirements.txt
We have not really tracked which version of certbot that is installed in the container, but I think we should. Adding it to the requirements.txt file helps us get notified by dependabot when a new version is available, and we can then trigger a rebuild to always keep us up to date. I also think we should try to bump at least our own patch version when certbot moves. That way we allow users to also not have it change from under their feet.
1 parent 5112379 commit 40ff6cd

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ updates:
77
interval: "daily"
88
time: "04:00"
99
open-pull-requests-limit: 10
10+
# Maintain dependencies for pip packages.
11+
- package-ecosystem: "pip"
12+
directory: "/src"
13+
schedule:
14+
interval: "daily"
15+
open-pull-requests-limit: 10
1016
# Maintain dependencies for GitHub Actions.
1117
- package-ecosystem: "github-actions"
1218
directory: "/"

src/Dockerfile

+7-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ ENV CERTBOT_DNS_AUTHENTICATORS \
2424
# any real need to cater to other programs/environments.
2525
ARG PIP_BREAK_SYSTEM_PACKAGES=1
2626

27+
# Through this we gain the ability to handle certbot upgrades through
28+
# dependabot pull requests.
29+
COPY requirements.txt /requirements.txt
30+
2731
# Do a single run command to make the intermediary containers smaller.
2832
RUN set -ex && \
2933
# Install packages necessary during the build phase (for all architectures).
@@ -44,10 +48,9 @@ RUN set -ex && \
4448
# Install the latest version of PIP, Setuptools and Wheel.
4549
curl -L 'https://bootstrap.pypa.io/get-pip.py' | python3 && \
4650
# Install certbot.
47-
pip3 install -U cffi certbot \
48-
# And the supported extra authenticators
49-
$(echo $CERTBOT_DNS_AUTHENTICATORS | sed 's/\(^\| \)/\1certbot-dns-/g') \
50-
&& \
51+
pip3 install -r /requirements.txt && \
52+
# And the supported extra authenticators.
53+
pip3 install $(echo $CERTBOT_DNS_AUTHENTICATORS | sed 's/\(^\| \)/\1certbot-dns-/g') && \
5154
# Remove everything that is no longer necessary.
5255
apt-get remove --purge -y \
5356
build-essential \

src/Dockerfile-alpine

+7-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ ENV CERTBOT_DNS_AUTHENTICATORS \
1919
ionos \
2020
bunny
2121

22+
# Through this we gain the ability to handle certbot upgrades through
23+
# dependabot pull requests.
24+
COPY requirements.txt /requirements.txt
25+
2226
# Do a single run command to make the intermediary containers smaller.
2327
RUN set -ex && \
2428
# Install packages necessary during the build phase (for all architectures).
@@ -40,10 +44,9 @@ RUN set -ex && \
4044
# Install the latest version of PIP, Setuptools and Wheel.
4145
curl -L 'https://bootstrap.pypa.io/get-pip.py' | python3 && \
4246
# Install certbot.
43-
pip3 install -U cffi certbot \
44-
# And the supported extra authenticators
45-
$(echo $CERTBOT_DNS_AUTHENTICATORS | sed 's/\(^\| \)/\1certbot-dns-/g') \
46-
&& \
47+
pip3 install -r /requirements.txt && \
48+
# And the supported extra authenticators.
49+
pip3 install $(echo $CERTBOT_DNS_AUTHENTICATORS | sed 's/\(^\| \)/\1certbot-dns-/g') && \
4750
# Remove everything that is no longer necessary.
4851
apk del \
4952
cargo \

src/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
certbot==2.9.0

0 commit comments

Comments
 (0)