First I experienced this on Ubuntu, but it is bit old (12.04), so thought that maybe I have some old packages which aren't compatible anymore. But then I was able to reproduce same on fresh Docker image...
Dockerfile:
FROM centos:7
RUN yum install -y epel-release
RUN yum install -y autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz wget make
RUN wget http://varnish-cache.org/_downloads/varnish-5.2.0.tgz
RUN tar -zxvf varnish-5.2.0.tgz
RUN cd varnish-5.2.0 && sh autogen.sh && sh configure && make && make install && ldconfig
RUN yum install -y varnish-libs-devel
RUN wget https://github.com/varnish/varnish-modules/archive/0.12.1.tar.gz
RUN tar -zxvf 0.12.1.tar.gz
RUN cd varnish-modules-0.12.1 && export PKG_CONFIG_PATH=../varnish-5.2.0 && ./bootstrap && ./configure && make && make install
docker build -t varnish-dev:5.2.0 .
Sending build context to Docker daemon 30.72kB
Step 1/14 : FROM centos:7
---> d123f4e55e12
...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make all-recursive
make[1]: Entering directory `/varnish-modules-0.12.1'
Making all in src
make[2]: Entering directory `/varnish-modules-0.12.1/src'
VMODTOOL vcc_bodyaccess_if.c
Unknown option: -o
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
make[2]: *** [vcc_bodyaccess_if.c] Error 2
make[2]: Leaving directory `/varnish-modules-0.12.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/varnish-modules-0.12.1'
make: *** [all] Error 2
The command '/bin/sh -c cd varnish-modules-0.12.1 && export PKG_CONFIG_PATH=../varnish-5.2.0 && ./bootstrap && ./configure && make && make install' returned a non-zero code: 2
First I experienced this on Ubuntu, but it is bit old (12.04), so thought that maybe I have some old packages which aren't compatible anymore. But then I was able to reproduce same on fresh Docker image...
Dockerfile: