Last active
May 12, 2022 07:43
-
-
Save gquintard/c473c3f16a1f655383062ad66c2b8e5e to your computer and use it in GitHub Desktop.
vmod-request docker
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
FROM ubuntu:focal | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV DEBCONF_NONINTERACTIVE_SEEN=true | |
RUN apt-get update | |
RUN apt-get install -y curl cargo git pkg-config libssl-dev clang | |
RUN curl -s https://packagecloud.io/install/repositories/varnishcache/varnish71/script.deb.sh | bash | |
RUN apt-get install -y varnish-dev | |
RUN git clone https://github.com/gquintard/vmod_reqwest.git | |
WORKDIR /vmod_reqwest | |
RUN cargo build --release | |
RUN cp target/release/libvmod_reqwest.so $(pkg-config --variable=vmoddir varnishapi) | |
RUN echo 'vcl 4.1; import reqwest; backend be none;' > /tmp/test.vcl | |
RUN varnishd -C -f /tmp/test.vcl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment