29 lines
543 B
Docker
29 lines
543 B
Docker
FROM alpine:3.10
|
|
|
|
LABEL maintainer "Fabian Stamm <dev@fabianstamm.de>"
|
|
|
|
ENV ACME_AGREE="true"
|
|
ENV EMAIL=""
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
ca-certificates \
|
|
git \
|
|
mailcap \
|
|
openssh-client \
|
|
tzdata \
|
|
bash \
|
|
curl
|
|
|
|
RUN curl https://getcaddy.com | bash -s personal http.cors,http.ratelimit,tls.dns.cloudflare
|
|
|
|
#Validate install
|
|
RUN caddy -version
|
|
RUN caddy -plugins
|
|
|
|
EXPOSE 80 443
|
|
|
|
VOLUME [ "/root/.caddy", "/src" ]
|
|
WORKDIR /srv
|
|
|
|
CMD ["caddy", "--conf", "/etc/Caddyfile", "--log", "stdout", "--agree=$ACME_AGREE", "--email=$EMAIL"] |