Created
January 28, 2019 15:08
-
-
Save oscartbeaumont/4fec419137d1c51e47d908fa6e8aac64 to your computer and use it in GitHub Desktop.
Caddy Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
EXPOSE 80 | |
EXPOSE 443 | |
# 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 | |
#CMD sleep 9999999 | |
ENTRYPOINT ["/bin/caddy"] | |
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout", "--agree=$ACME_AGREE"] | |
# git checkout 598de9e6d990619e4a325e166825e3d3c365823c . | |
#FROM scratch | |
# TODO: Healthcheck | |
# 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