Compare commits

...

2 Commits

Author SHA1 Message Date
c077a9acc6 Build caddy ourselves with cloudflare and tcp support
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 2m10s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 7m42s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2025-02-11 13:17:06 +11:00
969a7adb8b Caddy only does http ports at the moment 2025-02-10 21:33:30 +11:00

View File

@ -1,8 +1,13 @@
FROM caddy:alpine FROM alpine
# Change to http respositories, so they we can cache the install packages # 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 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 # Configuration
COPY Caddyfile /etc/caddy/Caddyfile COPY Caddyfile /etc/caddy/Caddyfile
COPY default.key default.crt /etc/caddy/ssl/ COPY default.key default.crt /etc/caddy/ssl/
@ -10,6 +15,7 @@ COPY maintenance /var/www/html
RUN mkdir /etc/caddy/sites RUN mkdir /etc/caddy/sites
# Starting # Starting
EXPOSE 80 443 25 110 143 ENV XDG_DATA_HOME=/data
EXPOSE 80 443
CMD ["caddy","run","--config","/etc/caddy/Caddyfile","--adapter","caddyfile","--resume"] CMD ["caddy","run","--config","/etc/caddy/Caddyfile","--adapter","caddyfile","--resume"]
VOLUME [ "${XDG_DATA_HOME}" ] VOLUME [ "${XDG_DATA_HOME}" ]