Skip to content

Instantly share code, notes, and snippets.

@oscartbeaumont
Created January 28, 2019 15:57
Show Gist options
  • Save oscartbeaumont/7d933781e7afea5bb1ff476c48327eb7 to your computer and use it in GitHub Desktop.
Save oscartbeaumont/7d933781e7afea5bb1ff476c48327eb7 to your computer and use it in GitHub Desktop.
Caddy Dockerfile 2
FROM golang:alpine
RUN apk add git
RUN go get -u github.com/caddyserver/builds
RUN go get -u github.com/mholt/caddy
WORKDIR /go/src/github.com/mholt/caddy/caddy
RUN go run build.go -goos=linux -goarch=amd64
# TODO Add Plugins - ipfilter,
# The Final Stage
RUN cp ./caddy /bin/caddy
EXPOSE 8080
EXPOSE 8443
ENTRYPOINT ["/bin/caddy"]
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout", "--agree"]
# go run build.go -goos=linux -goarch=amd64 && /bin/caddy -conf=/etc/Caddyfile -log=stdout -agree -http-port=8080 -https-port=8443
# go run ./ -conf=/etc/Caddyfile -log=stdout -agree -http-port=8080 -https-port=8443
# git checkout 598de9e6d990619e4a325e166825e3d3c365823c .
# Disable Caddy Telemetry
# /bin/caddy --conf=/etc/Caddyfile --log=stdout --agree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment