Skip to content

Commit

Permalink
Varnish 7 image
Browse files Browse the repository at this point in the history
  • Loading branch information
Jancis committed Jan 19, 2024
1 parent 797371c commit 9813889
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
12 changes: 12 additions & 0 deletions silta-varnish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

Docker image based on official varnish image.

Varnish 6.x image specifics:

- based on Debian
- runs on port 80
- runs as root

Varnish 7.x image specifics:

- based on Alpine
- runs on port 8080
- runs as varnish

## Usage

docker pull wunderio/silta-varnish.
Expand Down
20 changes: 20 additions & 0 deletions silta-varnish/varnish7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM varnish:7.4.2-alpine

ARG VARNISH_STORAGE_BACKEND
ARG VARNISH_EXTRA_PARAMS

EXPOSE 8080 6082

COPY secret /etc/varnish/secret
COPY varnish-start.sh /

USER root

RUN mkdir -p -m a+w /var/lib/varnish/ \
&& chown varnish /var/lib/varnish

COPY TAGS /TAGS

USER varnish

CMD ["/varnish-start.sh"]
3 changes: 3 additions & 0 deletions silta-varnish/varnish7/TAGS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
7-v1
7-v1.0
7-v1.0.0
1 change: 1 addition & 0 deletions silta-varnish/varnish7/secret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
not-a-secret-123
2 changes: 2 additions & 0 deletions silta-varnish/varnish7/varnish-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
/usr/sbin/varnishd -F -f /etc/varnish/default.vcl -a :8080 -T :6082 -S /etc/varnish/secret -s ${VARNISH_STORAGE_BACKEND:-'file,/var/lib/varnish/varnish_storage.bin,512M'} ${VARNISH_EXTRA_PARAMS}

0 comments on commit 9813889

Please sign in to comment.