Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Varnish #1294

Closed
Closed

Conversation

ericandrewlewis
Copy link

@ericandrewlewis ericandrewlewis commented Dec 21, 2015

Hi,

we've open sourced our Varnish Dockerfile and would like to contribute it to the community 馃槃

Checklist for Review

  • associated with or contacted upstream?
  • does it fit into one of the common categories? ("service", "language stack", "base distribution")
  • is it reasonably popular, or does it solve a particular use case well?
  • does a documentation PR exist? (should be reviewed and merged at roughly the same time so that we don't have an empty image page on the Hub for very long)
  • dockerization review for best practices and cache gotchas/improvements (ala the official review guidelines)?
  • 2+ dockerization review?
  • existing official images have been considered as a base? (ie, if foobar needs Node.js, has FROM node:... instead of grabbing node via other means been considered?)
  • if FROM scratch, tarballs only exist in a single commit within the associated history?
  • passes current tests? any simple new tests that might be appropriate to add? (https://github.com/docker-library/official-images/tree/master/test)

@tianon
Copy link
Member

tianon commented Dec 31, 2015

Nice to finally see someone take a stab at an official Varnish image! 馃槃

I've got a couple high-level comments/questions to start off the discussion:

  1. Has Varnish upstream been contacted to see if they're interested in participating or at least endorsing? (and if they aren't interested, whether they'll mind if we press on without their participation)
  2. Looking at https://www.varnish-cache.org/releases, it would appear that both 4.1 and 4.0 are still officially supported, so it'd be great to have that reflected here. Also, they publish official binaries/packages, so I think we'd be remiss not to take advantage of that (especially so that the Dockerfiles are simpler and easier to maintain, but also so that we're creating an image that deploys Varnish the way that upstream recommends).

@ericandrewlewis
Copy link
Author

Has Varnish upstream been contacted to see if they're interested in participating or at least endorsing? (and if they aren't interested, whether they'll mind if we press on without their participation)

I reached out to the Varnish community a few weeks ago to solicit feedback, which there was some of but not a ton. I'll send another note out on that thread with an update.

Looking at https://www.varnish-cache.org/releases, it would appear that both 4.1 and 4.0 are still officially supported, so it'd be great to have that reflected here. Also, they publish official binaries/packages, so I think we'd be remiss not to take advantage of that (especially so that the Dockerfiles are simpler and easier to maintain, but also so that we're creating an image that deploys Varnish the way that upstream recommends).

In Varnish 3.0, VMODs (Varnish modules) were compiled against Varnish source. Since Varnish 4.0 VMODs can be compiled against a Varnish installation (not requiring source). However, many VMODs have not been updated to use this mechanism, and will still require Varnish source. Given that, we've found that having source available is a good default for backwards compatibility until more VMODs are updated. (see discussion)

@tianon
Copy link
Member

tianon commented Dec 31, 2015

Oh! That thread is fantastic and really answers both my questions perfectly; thanks for sharing. 馃槃

Your most recent post (https://www.varnish-cache.org/lists/pipermail/varnish-misc/2015-December/024747.html) requesting support for the efforts here is excellent, thanks for doing that. Do you want us to continue review in the meantime, or do you want to wait for a response to make sure we don't waste effort if it turns out the project would rather we not continue?

@ericandrewlewis
Copy link
Author

Do you want us to continue review in the meantime, or do you want to wait for a response to make sure we don't waste effort if it turns out the project would rather we not continue?

Yes, let's hold on a response.

@kevin1024
Copy link

Thanks for doing this. In lieu of an official image I'm going to go use yours 馃憤

@avoinea
Copy link
Contributor

avoinea commented Apr 20, 2016

  cd varnish-$VARNISH_VERSION && \
  ./autogen.sh && \
  ./configure && \
  make install && \
  rm ../varnish-$VARNISH_VERSION.tar.gz

Shouldn't you also cleanup src folder varnish-$VARNISH_VERSION? It adds 37M to the final image.

@teohhanhui
Copy link
Contributor

@avoinea Some Varnish modules need to be built with Varnish source. See #1294 (comment)

avoinea added a commit to eea/eea.docker.varnish that referenced this pull request Apr 20, 2016
- As there is an official PR for an official varnish image at
  docker-library/official-images#1294
- Add varnish-modules;
- Support saintmode backends out-of-the-box;
@andrerom
Copy link
Contributor

andrerom commented Jun 18, 2016

Would be great to see a official Varnish image, lowers the barrier for using Varnish locally, for testing, and on some server setups. At least that is what I need it for :)

However the proposed image does not seem to be usable as is like other official images. IMO purpose of an official image should be that it can be used out of the box, and extended if you need more modules/plugins/* => VMODs, not just as a base image. So a propoer entrypoint is at least needed here.

Also, maybe add an Alpine variant without the source to give incentive to users/maintainers of VMODs to update?

@teohhanhui
Copy link
Contributor

@andrerom The original repo seems to be inactive. We've forked it here: https://github.com/tripviss/docker-varnish

Hoping to make it better...

@tianon tianon added new-image and removed moreinfo labels Oct 5, 2016
@tianon
Copy link
Member

tianon commented Nov 30, 2016

@ericandrewlewis do you think we've given upstream enough time to raise objections at this point? Any value in continuing to press them, or do you think we should press forward? It looks like you've got some interested co-conspirators now. 馃槃

@ericandrewlewis
Copy link
Author

I think we've given upstream enough time, yeah. The Varnish core team seems rather neutral on the topic, and if they ever want to get more involved I'm sure they could.

I can't commit to being a maintainer at this point, so I leave it to y'all to decide what to do going forward here. Cheers!

@andrerom
Copy link
Contributor

andrerom commented Dec 1, 2016

馃憤 I also have the impression they won't handle this but don't mind others do it.

For official image, what about adding a few things:

  • entrypoint (could be added later to, but useful)
  • Varnish 5
  • Afaik should not take to much space, is official package now and very useful: https://github.com/varnish/varnish-modules (download link on the readme)

@tianon
Copy link
Member

tianon commented Apr 5, 2017

Thanks @ericandrewlewis 鉂わ笍 馃憤

I hope you don't mind if I close this -- if another group takes up the torch, they should refer back to this discussion! 馃

@tianon tianon closed this Apr 5, 2017
@teohhanhui teohhanhui mentioned this pull request May 29, 2018
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants