You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
791 B

  1. # build stage
  2. FROM golang:alpine AS build-env
  3. RUN apk add --no-cache git
  4. RUN go get -d -v github.com/mholt/caddy/caddy github.com/pedronasser/caddy-search github.com/simia-tech/caddy-locale
  5. WORKDIR /go/src/github.com/mholt/caddy/caddy
  6. RUN sed -i '/This is where other plugins get plugged in (imported)/a _ "github.com/pedronasser/caddy-search"' caddymain/run.go \
  7. && sed -i '/This is where other plugins get plugged in (imported)/a _ "github.com/simia-tech/caddy-locale"' caddymain/run.go \
  8. && go install -v . \
  9. && /go/bin/caddy -version
  10. FROM alpine:edge
  11. EXPOSE 80
  12. RUN apk add --no-cache wget mailcap ca-certificates
  13. COPY --from=build-env /go/bin/caddy /usr/sbin/caddy
  14. COPY docker/caddy.conf /etc/caddy.conf
  15. COPY public /srv/www
  16. CMD ["/usr/sbin/caddy", "-conf", "/etc/caddy.conf"]