Public Repository

Last pushed: a year ago
Short Description
This is a varnish docker container used to test Development Use Only.
Full Description

An Varnish running inside docker.

A Docker container for setting up Vanish. This server can respond to requests from any client browser with cached content after the initial request has been successful. This container best suites development purposes.

This is a sample Varnish docker container used to test Wordpress installation on

To build this varnish server run the following command:

$ docker pull globalfoodbook/varnish

This will run on a default port of 80.

To run the server and expose it on port 80 of the host machine, run the following command:

$ docker run --name=varnish --link=gfb:backend -e  --detach=true --publish=80:80 --tty=true varnish


Before pushing to docker hub


$ docker login


$ cd /to/docker/directory/path/
$ docker build -t <username>/<repo>:latest .

Push to docker hub

$ docker push <username>/<repo>:latest

IP=docker inspect varnish | grep -w "IPAddress" | awk '{ print $2 }' | head -n 1 | cut -d "," -f1 | sed "s/\"//g"
HOST_IP=/sbin/ifconfig eth1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'

DOCKER_HOST_IP=awk 'NR==1 {print $1}' /etc/hosts # from inside a docker container


Docker Pull Command