Varnish and Docker

Brice Burgess nesta at iceburg.net
Thu Dec 10 06:37:14 CET 2015


Eric,

The way I'm reading this dockerfile, you're using the official debian 8 
(already compiled) varnish package?

Perhaps a bit off-topic, but it's generally a good approach to build 
from source -- and using a build system to allow quick distribution of 
alternate versions (such as running a specific commit/release). So I 
think building from source does make sense.

Docker plays very nicely here with with flexible version-tagging of 
images and 1.9 supports build arguments. Also helpful to offer more base 
images, and recommend alpine:latest as a lightweight alternative to 
debian:jessie (haven't personally compiled varnish on busybox/musl, 
although 4.1.0 exists as an alpine package).


~ Brice

On 12/09/2015 12:55 PM, Lewis, Eric wrote:
>
>     Not a big deal, since the Docker containers will presumably be for
>     specific versions. It's just for the 4.x containers, the sources
>     won't be necessary, at least not for building VMODs.
>
>
> This is great to hear! I've put together a quick Dockerfile 
> <https://gist.github.com/ericandrewlewis/20d531d190d71e92f3b6> that 
> uses Debian packages to install the latest stable (4.0.3). On top of 
> this, I was able to install the example module 
> <https://github.com/varnish/libvmod-example> with ease.
>
> However, other Varnish modules can't be built so easily on 4.0 yet 
> <https://github.com/Dridi/libvmod-querystring/issues/16>. Module 
> authors need to update their modules to build from the Varnish 
> installation with 4.0 instead of from source. Perhaps we could reach 
> out to the VMOD developer community about this.
>
> Until there's more support for this in modules, installing Varnish 
> from source seems like the best default, so users don't get burned.
>
> Eric Lewis
> Web Developer, Interactive News
> The New York Times
> 620 Eighth Avenue, 2nd Floor
> New York, NY 10018
> Office: (212) 556-2081
> Cell: (610) 715-8560
>
> On Wed, Dec 9, 2015 at 4:57 AM, Geoff Simmons <geoff at uplex.de 
> <mailto:geoff at uplex.de>> wrote:
>
>     -----BEGIN PGP SIGNED MESSAGE-----
>     Hash: SHA256
>
>     On 12/08/2015 10:33 PM, Lewis, Eric wrote:
>     >
>     > I'd like to solicit feedback from you and invite the Varnish
>     > community to contribute to this effort.
>     >
>     > Most Dockerfiles install Varnish via a linux package manager,
>     > which makes it impossible to install VMODs because they need to be
>     > compiled against Varnish source.
>
>     That's true of Varnish 3.x, but not since 4.0 -- VMODs are now built
>     against a Varnish installation, which has all of the necessary headers
>     and libs. It should be enough just to have pkg-config return the
>     correct information for 'varnishapi', which will be the case without
>     further intervention in a default Varnish installation.
>
>     Not a big deal, since the Docker containers will presumably be for
>     specific versions. It's just for the 4.x containers, the sources won't
>     be necessary, at least not for building VMODs.
>
>
>     Best,
>     Geoff
>     - --
>     ** * * UPLEX - Nils Goroll Systemoptimierung
>
>     Scheffelstraße 32
>     22301 Hamburg
>
>     Tel +49 40 2880 5731 <tel:%2B49%2040%202880%205731>
>     Mob +49 176 636 90917 <tel:%2B49%20176%20636%2090917>
>     Fax +49 40 42949753 <tel:%2B49%2040%2042949753>
>
>     http://uplex.de
>     -----BEGIN PGP SIGNATURE-----
>     Version: GnuPG v1
>
>     iQIcBAEBCAAGBQJWZ/rjAAoJEOUwvh9pJNURoX4QAK9Ds9lgBlISF1CrDntwAChe
>     ZX3cHXPcCaE+mUR8t+ESKF6I1t9ewf9jFVjrHi2oW6ZVHUAx+fQbdEvULi4PzfUj
>     zumWrtzOA9kAx55ECBBCOxthZ7fLyDKSZxrJxeJVMpm5p4L46KyjEUUEDdm/FLZN
>     cWUTIweHdfgroW+7McqxFlVRMiDDUEcoBXoAI9P23BXVl3doKBx/bAfyZUR6yn0y
>     ESdZVKhlH2cdN1tFSuFO/v6Qd6YrhMPyG30d94UgZ1pUmzpqKNSQx4SkX1LU5jzx
>     XJMXC9AcJzFTzMdGRfIOHFu0Opx2QIRQii5AOd58Bv3HmEjpZJFnJuwclfkSBxPK
>     4ASI3/Q/8LL3u5s2XGT7R4qNK095swP9kYPLDAclBMe/VDNyBpwdkbOm69yr3rhk
>     j0u0ErkDUFOVucS5jXSt9LxS/7EX5WexDNIrQA+E8Uab2IbzaznMKS/xgKfrHcl1
>     WZSwTj/2in8QqaxIzYKAVjrXlRgEnn0QAR6+ZKe0+Str0I4BMw0zJ6Yb+DLJlw0t
>     cKfBZ9rNLr+MqAsJ7YMyhHUgmuI9LIyHWr/hbhgqccM5LIURy7ZGISJ5MrAUyi1k
>     9ONKivNZc4Y+oAsQLxFhfwRWQ39ExerJMNjWIEx3SxpV+DEFk5iJ7RBT4KY3mfXe
>     E4VJJ+ueBbfztEHaaFG2
>     =jo7N
>     -----END PGP SIGNATURE-----
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151210/c4edcf9b/attachment.html>


More information about the varnish-misc mailing list