From bcc4422661d12942d0c92382071ea689ab31538d Mon Sep 17 00:00:00 2001 From: Niall Byrne <9848926+niall-byrne@users.noreply.github.com> Date: Thu, 16 Nov 2023 22:14:12 -0500 Subject: [PATCH] build(DOCKER): add backports, pin dependencies --- .vale/Vocab/smtp/accept.txt | 1 + Dockerfile | 8 ++++++-- providers/aws.bash | 4 +++- providers/cloudflare.bash | 5 ++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.vale/Vocab/smtp/accept.txt b/.vale/Vocab/smtp/accept.txt index 446fd90..86d7c43 100644 --- a/.vale/Vocab/smtp/accept.txt +++ b/.vale/Vocab/smtp/accept.txt @@ -1,4 +1,5 @@ aws|AWS +backports certbot cloudflare|Cloudflare dockerhub|DockerHub diff --git a/Dockerfile b/Dockerfile index e6375a2..ed24752 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,11 +16,15 @@ RUN mkdir -p certbot /usr/local/share/certs/providers /usr/local/share/certs/scr COPY providers/"${PROVIDER}".bash /usr/local/share/certs/providers COPY scripts/*.bash /usr/local/share/certs/scripts +# Add Backports +RUN printf "deb http://httpredir.debian.org/debian bullseye-backports main\ndeb-src http://httpredir.debian.org/debian bullseye-backports main" \ + > /etc/apt/sources.list.d/backports.list + RUN apt-get update \ && \ apt-get install -y --no-install-recommends \ - certbot \ - jq \ + certbot=1.* \ + jq=1.* \ && \ bash -c " \ source /usr/local/share/certs/providers/${PROVIDER}.bash \ diff --git a/providers/aws.bash b/providers/aws.bash index cff0b52..35eb65a 100644 --- a/providers/aws.bash +++ b/providers/aws.bash @@ -5,7 +5,9 @@ provider_create() { } provider_dependencies() { - apt-get install -y --no-install-recommends awscli python3-certbot-dns-route53 + apt-get install -y --no-install-recommends \ + awscli=1.* \ + python3-certbot-dns-route53=1.* } provider_dkim() { diff --git a/providers/cloudflare.bash b/providers/cloudflare.bash index 0bd0d0a..1f5d658 100644 --- a/providers/cloudflare.bash +++ b/providers/cloudflare.bash @@ -6,7 +6,10 @@ provider_create() { } provider_dependencies() { - apt-get install -y --no-install-recommends curl python3-certbot-dns-cloudflare + apt-get install -y --no-install-recommends \ + curl=7.88.* \ + libcurl4=7.88.* \ + python3-certbot-dns-cloudflare=1.* } provider_dkim() {