From 545f5653f0a4c15d6b1d3f162c5f7e8e1992a29c 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 a250a8d..b31f4f5 100644 --- a/.vale/Vocab/smtp/accept.txt +++ b/.vale/Vocab/smtp/accept.txt @@ -1,4 +1,5 @@ aws|AWS +backports certbot cloudflare|Cloudflare dev|Dev 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 230ab29..fb34595 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 2562719..b153b94 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() {