adding a varnish container
This commit is contained in:
parent
47c3fa9a7b
commit
ba65a6e172
2 changed files with 30 additions and 0 deletions
10
fedora-varnish/Dockerfile
Normal file
10
fedora-varnish/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
FROM fedora
|
||||||
|
|
||||||
|
RUN yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs varnish /usr/lib/rpm/redhat/redhat-hardened-cc1 && rm -rf /var/cache/yum
|
||||||
|
ADD run.sh /srv/run.sh
|
||||||
|
|
||||||
|
VOLUME ["/etc/varnish","/var/lib/varnish"]
|
||||||
|
|
||||||
|
EXPOSE 6081 6082
|
||||||
|
CMD ["/srv/run.sh"]
|
||||||
|
|
20
fedora-varnish/run.sh
Executable file
20
fedora-varnish/run.sh
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source /etc/varnish/varnish.params
|
||||||
|
|
||||||
|
/usr/sbin/varnishd \
|
||||||
|
-F \
|
||||||
|
-P /var/run/varnish.pid \
|
||||||
|
-f $VARNISH_VCL_CONF \
|
||||||
|
-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
|
||||||
|
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
|
||||||
|
-t $VARNISH_TTL \
|
||||||
|
-w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
|
||||||
|
-u $VARNISH_USER \
|
||||||
|
-g $VARNISH_GROUP \
|
||||||
|
-S $VARNISH_SECRET_FILE \
|
||||||
|
-s $VARNISH_STORAGE \
|
||||||
|
$DAEMON_OPTS
|
||||||
|
|
Loading…
Reference in a new issue