about summary refs log tree commit diff stats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index bf01304..ca10c88 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,18 @@
-FROM docker.io/caddy:2-alpine
+ARG VERSION=2.6
+ARG VARIANT=alpine
+
+FROM docker.io/caddy:${VERSION}-builder-${VARIANT} AS builder
+
+RUN xcaddy build \
+    --with github.com/gamalan/caddy-tlsredis
+
+FROM docker.io/caddy:${VERSION}-${VARIANT}
+
+COPY --from=builder /usr/bin/caddy /usr/bin/caddy
 
 COPY Caddyfile /etc/caddy/
 COPY public /srv
 
 EXPOSE 9091/tcp
-EXPOSE 8080/tcp
 
 ENV SITE_ROOT=/srv