All Projects → coopTilleuls → docker-varnish

coopTilleuls / docker-varnish

Licence: Apache-2.0 license
Docker image for Varnish Cache (caching HTTP reverse proxy)

Programming Languages

Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to docker-varnish

varnish-operator
Run and manage Varnish clusters on Kubernetes
Stars: ✭ 47 (+2.17%)
Mutual labels:  varnish-cache, varnish
nginx-proxy
Docker container for automatically creating nginx configuration based on active services in docker host.
Stars: ✭ 28 (-39.13%)
Mutual labels:  reverse-proxy
Pomerium
Pomerium is an identity-aware access proxy.
Stars: ✭ 2,860 (+6117.39%)
Mutual labels:  reverse-proxy
node-proxy
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 71 (+54.35%)
Mutual labels:  reverse-proxy
Varnish Cache
Varnish Cache source code repository
Stars: ✭ 2,769 (+5919.57%)
Mutual labels:  reverse-proxy
spp
A simple and powerful proxy
Stars: ✭ 575 (+1150%)
Mutual labels:  reverse-proxy
Xfrp
xfrps&frp client for openwrt&LEDE
Stars: ✭ 205 (+345.65%)
Mutual labels:  reverse-proxy
libvmod-redis
VMOD using the synchronous hiredis library API to access Redis servers from VCL.
Stars: ✭ 76 (+65.22%)
Mutual labels:  varnish
VarnishPurge-Craft
Craft plugin for purging Varnish when elements are saved.
Stars: ✭ 33 (-28.26%)
Mutual labels:  varnish
gateway
A high-performance API Gateway with middlewares, supporting HTTP and gRPC protocols.
Stars: ✭ 520 (+1030.43%)
Mutual labels:  reverse-proxy
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+443.48%)
Mutual labels:  reverse-proxy
Ecs Nginx Reverse Proxy
Reference architecture for deploying Nginx on ECS, both as a basic static resource server, and as a reverse proxy in front of a dynamic application server.
Stars: ✭ 245 (+432.61%)
Mutual labels:  reverse-proxy
varnish-caching-wordpress-plugin
Varnish Cache Wordpress implementation
Stars: ✭ 18 (-60.87%)
Mutual labels:  varnish-cache
Otunnel
peer-to-peer tunnel tool
Stars: ✭ 224 (+386.96%)
Mutual labels:  reverse-proxy
medium-go-nginx-docker
Use Nginx with Docker to serve a Golang app.
Stars: ✭ 45 (-2.17%)
Mutual labels:  reverse-proxy
Cloudmare
Cloudflare, Sucuri, Incapsula real IP tracker.
Stars: ✭ 213 (+363.04%)
Mutual labels:  reverse-proxy
Fasttunnel
NAT 内网穿透 远程内网计算机 域名访问内网站点 反向代理内网服务 花生壳 端口转发 http代理 微信 小程序 expose a local server behind a NAT or firewall to the internet like ngrok and frp. NAT ssh proxy tunnel reverse-proxy
Stars: ✭ 248 (+439.13%)
Mutual labels:  reverse-proxy
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (-52.17%)
Mutual labels:  reverse-proxy
wsp
HTTP tunnel over Websocket
Stars: ✭ 85 (+84.78%)
Mutual labels:  reverse-proxy
revp
Reverse HTTP proxy that works on Linux, Windows, and macOS. Made with C++ and Boost.
Stars: ✭ 80 (+73.91%)
Mutual labels:  reverse-proxy

Supported tags and respective Dockerfile links

Quick reference

What is Varnish?

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as APIs. In contrast to other web accelerators, such as Squid, which began life as a client-side cache, or Apache and nginx, which are primarily origin servers, Varnish was designed as an HTTP accelerator. Varnish is focused exclusively on HTTP, unlike other proxy servers that often support FTP, SMTP and other network protocols.

wikipedia.org/wiki/Varnish_(software)

logo

How to use this image.

Basic usage

Create a default.vcl file:

vcl 4.0;

backend default {
  .host = "www.nytimes.com";
  .port = "80";
}

Then run:

$ docker run --name my-running-varnish -v /path/to/default.vcl:/usr/local/etc/varnish/default.vcl:ro --tmpfs /usr/local/var/varnish:exec -d cooptilleuls/varnish

Alternatively, a simple Dockerfile can be used to generate a new image that includes the necessary default.vcl (which is a much cleaner solution than the bind mount above):

FROM cooptilleuls/varnish:6.2

COPY default.vcl /usr/local/etc/varnish/

Place this file in the same directory as your default.vcl, run docker build -t my-varnish ., then start your container:

$ docker run --name my-running-varnish --tmpfs /usr/local/var/varnish:exec -d my-varnish

Exposing the port

$ docker run --name my-running-varnish --tmpfs /usr/local/var/varnish:exec -d -p 8080:80 my-varnish

Then you can hit http://localhost:8080 or http://host-ip:8080 in your browser.

How to install VMODs (Varnish Modules)

VMODs are extensions written for Varnish Cache.

Install VMODs in your Varnish project's Dockerfile. For example, to install the vmod-querystring module:

FROM cooptilleuls/varnish:6.2

# install vmod-querystring
ENV VMOD_QUERYSTRING_VERSION 1.0.5
RUN set -eux; \
	\
	fetchDeps=' \
		ca-certificates \
		wget \
	'; \
	buildDeps=" \
		$VMOD_BUILD_DEPS \
		dpkg-dev \
	"; \
	apt-get update; \
	apt-get install -y --no-install-recommends $fetchDeps $buildDeps; \
	rm -rf /var/lib/apt/lists/*; \
	\
	wget -O vmod-querystring.tar.gz "https://github.com/Dridi/libvmod-querystring/releases/download/v$VMOD_QUERYSTRING_VERSION/vmod-querystring-$VMOD_QUERYSTRING_VERSION.tar.gz"; \
	mkdir -p /usr/local/src/vmod-querystring; \
	tar -zxf vmod-querystring.tar.gz -C /usr/local/src/vmod-querystring --strip-components=1; \
	rm vmod-querystring.tar.gz; \
	\
	cd /usr/local/src/vmod-querystring; \
	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
	./configure \
		--build="$gnuArch" \
	; \
	make -j "$(nproc)"; \
	make install; \
	\
	cd /; \
	rm -rf /usr/local/src/vmod-querystring; \
	\
	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps $buildDeps

Image Variants

The cooptilleuls/varnish images come in many flavors, each designed for a specific use case.

cooptilleuls/varnish:<version>

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

Some of these tags may have names like stretch in them. These are the suite code names for releases of Debian and indicate which release the image is based on.

cooptilleuls/varnish:<version>-alpine

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.

To minimize image size, it's uncommon for additional related tools (such as git or bash) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the alpine image description for examples of how to install packages if you are unfamiliar).

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].