Build caddy ourselves with cloudflare and tcp support
This commit is contained in:
parent
969a7adb8b
commit
c077a9acc6
@ -1,8 +1,13 @@
|
||||
FROM caddy:alpine
|
||||
FROM alpine
|
||||
|
||||
# Change to http respositories, so they we can cache the install packages
|
||||
RUN if [ -n "${HTTP_PROXY}" ] ; then echo "Using HTTP PROXY [${HTTP_PROXY}]" && sed -i -e s'/https/http/' /etc/apk/repositories; fi
|
||||
|
||||
RUN apk --no-cache add xcaddy \
|
||||
&& xcaddy build --with github.com/caddy-dns/cloudflare --with github.com/mholt/caddy-l4 --output=/usr/sbin/caddy \
|
||||
&& apk --no-cache del xcaddy \
|
||||
&& rm -rf /root/go /root/.cache
|
||||
|
||||
# Configuration
|
||||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
COPY default.key default.crt /etc/caddy/ssl/
|
||||
@ -10,6 +15,7 @@ COPY maintenance /var/www/html
|
||||
RUN mkdir /etc/caddy/sites
|
||||
|
||||
# Starting
|
||||
ENV XDG_DATA_HOME=/data
|
||||
EXPOSE 80 443
|
||||
CMD ["caddy","run","--config","/etc/caddy/Caddyfile","--adapter","caddyfile","--resume"]
|
||||
VOLUME [ "${XDG_DATA_HOME}" ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user