Skip to content

Instantly share code, notes, and snippets.

@cosimo
Last active March 25, 2024 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosimo/314e441313426a93bdfd3438059e44f9 to your computer and use it in GitHub Desktop.
Save cosimo/314e441313426a93bdfd3438059e44f9 to your computer and use it in GitHub Desktop.
Dockerfile to build libvmod-dynamic 7.4 (https://github.com/nigoroll/libvmod-dynamic)
# Build libvmod_dynamic.so from source (https://github.com/nigoroll/libvmod-dynamic@7.4)
FROM ubuntu:20.04
ENV TZ=Etc/UTC
ENV VARNISH_VERSION 7.4
# Avoid tzdata terminal configuration that would halt the build
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update -qq
RUN apt-get install -y python3 python3-docutils python3-sphinx libpcre2-dev libreadline-dev autoconf make automake libtool git-core pkg-config libvarnishapi2
# libgetdns-dev needs to be installed for libvmod-dynamic configure script
# to pick it up and enable the resolver objects.
RUN apt-get install -y libgetdns-dev libgetdns10
RUN cd /tmp && git clone https://github.com/varnishcache/varnish-cache && cd varnish-cache \
&& git checkout ${VARNISH_VERSION} \
&& ./autogen.sh && ./configure --prefix=/usr \
&& make -j8 && make install \
&& cp -p varnishapi.pc /usr/lib/pkgconfig/ \
&& cp -p varnish.m4 /usr/share/aclocal/
RUN cd /tmp && git clone https://github.com/nigoroll/libvmod-dynamic && cd libvmod-dynamic \
&& git checkout ${VARNISH_VERSION} \
&& ./autogen.sh && ./configure --prefix=/usr \
&& make && make install && ls -l src/.libs/libvmod_dynamic.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment