Last active
July 31, 2018 14:28
-
-
Save wader/669fecab510d6a4f35b8197e7bb4d7f1 to your computer and use it in GitHub Desktop.
Caddy docker image
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
| :8080/web_path/ { | |
| #tls off | |
| root /some/local/path | |
| browse / | |
| } |
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:1.10 as builder | |
| ENV PLUGINS \ | |
| github.com/hacdias/caddy-webdav | |
| RUN go get github.com/mholt/caddy/caddy $PLUGINS | |
| RUN echo \ | |
| 'package caddymain\n' \ | |
| 'import (\n' \ | |
| $(for p in $PLUGINS; do echo "_ \"$p\"\\\n"; done) \ | |
| ')\n' \ | |
| > /go/src/github.com/mholt/caddy/caddy/caddymain/plugins.go | |
| RUN go install -installsuffix netgo -tags netgo github.com/mholt/caddy/caddy | |
| FROM scratch | |
| COPY --from=builder /go/bin/caddy / | |
| EXPOSE 80/tcp 443/tcp | |
| WORKDIR / | |
| ENTRYPOINT ["/caddy"] | |
| CMD ["--conf", "/Caddyfile", "--log", "stdout"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment