Skip to content

Instantly share code, notes, and snippets.

@coderanger
Last active August 17, 2018 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderanger/a28c1d2e33f24722615008c32b5d8a2f to your computer and use it in GitHub Desktop.
Save coderanger/a28c1d2e33f24722615008c32b5d8a2f to your computer and use it in GitHub Desktop.
Dockerfile snippet for Caddy build
###################
# Caddy build image
FROM abiosoft/caddy:builder
ARG caddy_version="0.11.0"
ARG caddy_plugins="cors,realip,expires,proxyprotocol,prometheus"
ENV ENABLE_TELEMETRY="false"
# Disable a bunch of standard plugins we don't need.
RUN sed -i "/# build/a sed -Ei '/caddyhttp.(basicauth|browse|fastcgi|markdown|templates|websocket)/d' /go/src/github.com/mholt/caddy/caddyhttp/caddyhttp.go" /usr/bin/builder.sh
RUN VERSION=${caddy_version} PLUGINS=${caddy_plugins} /bin/sh /usr/bin/builder.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment