From 5d57259aef7838d9ea0b7465c6e5bbc47d6e8157 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Fri, 26 Jun 2020 16:41:42 +0200 Subject: [PATCH] Upgrading to Caddy 2.1 --- Dockerfile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index ebb3154..a15d169 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,26 @@ -FROM caddy:builder AS builder +ARG version=2.1.0-beta.1 -RUN caddy-builder \ - github.com/caddy-dns/cloudflare +FROM golang:1.14-alpine3.11 AS builder +ARG version -FROM caddy:2.0.0 +WORKDIR /src -COPY --from=builder /usr/bin/caddy /usr/bin/caddy +RUN apk add --no-cache \ + git \ + ca-certificates +RUN go get -u github.com/caddyserver/xcaddy/cmd/xcaddy + +ENV CADDY_VERSION="v${version}" +RUN xcaddy build --with github.com/caddy-dns/cloudflare --output /usr/bin/caddy + +RUN /usr/bin/caddy version + +FROM caddy:${version} LABEL maintainer "Fabian Stamm " -# RUN apk add --no-cache \ -# ca-certificates \ -# git \ -# mailcap \ -# openssh-client \ -# tzdata \ -# bash \ -# curl + +COPY --from=builder /usr/bin/caddy /usr/bin/caddy #Validate install