From 73ae7258e9739c303b76e3eaf6fcd264b0379743 Mon Sep 17 00:00:00 2001 From: Guillaume Quintard Date: Tue, 16 Jan 2024 10:55:35 -0800 Subject: [PATCH] update Dockerfile to install the runtime ssl lib --- Cargo.lock | 2 +- Dockerfile | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e4b27f..1f3b7cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1281,7 +1281,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vmod_reqwest" -version = "0.0.9" +version = "0.0.10" dependencies = [ "anyhow", "bytes", diff --git a/Dockerfile b/Dockerfile index b4accf1..ffe91bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,24 @@ -FROM rust:1.73-buster +# we need the same debian version on the rust and varnish so +# that libssl-dev and libssl3 match +FROM rust:1.73-bookworm WORKDIR /vmod_reqwest ARG VMOD_REQWEST_VERSION=0.0.10 ARG RELEASE_URL=https://github.com/gquintard/vmod_reqwest/archive/refs/tags/v${VMOD_REQWEST_VERSION}.tar.gz ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -RUN curl -s https://packagecloud.io/install/repositories/varnishcache/varnish74/script.deb.sh | bash && apt-get update && apt-get install -y varnish-dev clang libssl-dev - -RUN curl -Lo dist.tar.gz ${RELEASE_URL} && \ - tar xavf dist.tar.gz --strip-components=1 && \ +RUN set -e; \ + curl -s https://packagecloud.io/install/repositories/varnishcache/varnish74/script.deb.sh | bash; \ + apt-get install -y varnish-dev clang libssl-dev; \ + curl -Lo dist.tar.gz ${RELEASE_URL}; \ + tar xavf dist.tar.gz --strip-components=1; \ cargo build --release FROM varnish:7.4 +USER root +RUN set -e; \ + apt-get update; \ + apt-get install -y libssl3; \ + rm -rf /var/lib/apt/lists/* COPY --from=0 /vmod_reqwest/target/release/libvmod_reqwest.so /usr/lib/varnish/vmods/ +USER varnish