Skip to content

Instantly share code, notes, and snippets.

@rudle
Created December 8, 2021 01:01
Show Gist options
  • Save rudle/e94528f596878970eace527adaa56fe6 to your computer and use it in GitHub Desktop.
Save rudle/e94528f596878970eace527adaa56fe6 to your computer and use it in GitHub Desktop.
I expect this to work, but it doesn't
FROM varnish
RUN apt update -y && apt install -y build-essential automake curl libtool git
RUN curl -s https://packagecloud.io/install/repositories/varnishcache/varnish60/script.deb.sh
RUN apt install -y varnish-modules
@rudle
Copy link
Author

rudle commented Dec 8, 2021

------
 > [4/5] RUN apt install -y varnish-modules:
#7 0.311 
#7 0.311 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#7 0.311 
#7 0.318 Reading package lists...
#7 0.834 Building dependency tree...
#7 0.964 Reading state information...
#7 1.020 Some packages could not be installed. This may mean that you have
#7 1.020 requested an impossible situation or if you are using the unstable
#7 1.020 distribution that some required packages have not yet been created
#7 1.020 or been moved out of Incoming.
#7 1.020 The following information may help to resolve the situation:
#7 1.020 
#7 1.020 The following packages have unmet dependencies:
#7 1.083  varnish-modules : Depends: varnishabi-12.0
#7 1.097 E: Unable to correct problems, you have held broken packages.

@rudle
Copy link
Author

rudle commented Dec 8, 2021

FROM debian:bullseye

RUN apt update -y && apt install -y curl build-essential dpkg-dev
RUN curl -s https://packagecloud.io/install/repositories/varnishcache/varnish70/script.deb.sh | bash
RUN apt update -y && apt install -y varnish varnish-dev

RUN apt update -y && apt install -y build-essential automake libtool curl git python3-docutils
RUN git clone https://github.com/varnish/varnish-modules.git /tmp/vm && \
    cd /tmp/vm && \
    ./bootstrap && \
    ./configure && \
    make && \
    make check && \
    make install

This ended up working. The version of varnish-dev from packagecloud must match the version of varnish from the primary debian sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment