-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update Dockerfile to install the runtime ssl lib
- Loading branch information
Showing
2 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |