#!/bin/sh

DISTRO=`cat /etc/*-release | grep ^ID= | sed s/ID=// | tr -d '"'`
IMAGE=centos/varnish-5-$DISTRO
[[ $DISTRO =~ rhel* ]] && IMAGE=rhscl/varnish-5-$DISTRO
[[ $DISTRO =~ fedora* ]] && IMAGE=${FGC}/varnish

cat <<EOF
This is a S2I ${IMAGE_DESCRIPTION} ${DISTRO} base image:
To use it, install S2I: https://github.com/openshift/source-to-image

Sample invocation:

s2i build https://github.com/sclorg/varnish-container.git --context-dir=5/test/test-app/ ${IMAGE} varnish-sample-app

You can then run the resulting image via:
docker run -p 8080:8080 varnish-sample-app
EOF
