Skip to content

Commit

Permalink
update Dockerfile to install the runtime ssl lib
Browse files Browse the repository at this point in the history
  • Loading branch information
gquintard committed Jan 16, 2024
1 parent 28e083a commit 73ae725
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 73ae725

Please sign in to comment.