Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varnish 7 image #172

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}