varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

Help | Install varnish module in varnish alpine docker image (6.6.1-alpine) #186

Closed sajixavier closed 3 years ago

sajixavier commented 3 years ago

Hi,

I am trying to install varnish module in varnish 6.6.1-alpine. Getting following error

config.status: executing depfiles commands
config.status: error: in `/tmp/varnish-modules':
config.status: error: Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).

Following is the docker file that I am using.

ARG VARNISH_VERSION="6.6.1-alpine"
ARG VARNISH_MODULES_BRANCH="6.6"

FROM varnish:$VARNISH_VERSION as modules

ARG VARNISH_MODULES_BRANCH
ARG BUILD_TOOLS=" \
    varnish-dev \
    automake \
    autoconf \
    libtool \
    python3 \
    py-docutils \
    make \
    git \
  "

RUN apk --update --no-cache add \
  $BUILD_TOOLS

RUN cd /tmp \
  && git clone --branch $VARNISH_MODULES_BRANCH --single-branch https://github.com/varnish/varnish-modules.git \
  && cd varnish-modules \
  && ./bootstrap \
  && ./configure \
  && make -j $(nproc) \
  && make install

FROM varnish:$VARNISH_VERSION

COPY --from=modules /usr/lib/varnish/vmods/* /usr/lib/varnish/vmods/

COPY docker-entrypoint.sh /usr/local/bin/docker-varnish-entrypoint
RUN chmod +x /usr/local/bin/docker-varnish-entrypoint

ENTRYPOINT ["docker-varnish-entrypoint"]
gquintard commented 3 years ago

your Dockerfile works beautifully here, are you sure that's exactly the one you used?

sajixavier commented 3 years ago

Thank you for checking this.

For some reason the exact code was showing the error. I re-installed my vagrant box and now it is working fine.

gquintard commented 3 years ago

alright, I'll close this for now, please reopen if you are able to reproduce