caddy的docker部署程序
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.
 
 

34 lines
655 B

  1. FROM golang:1.13-alpine as builder
  2. RUN apk add --no-cache git gcc musl-dev
  3. RUN mkdir /www /caddy
  4. COPY builder.sh /usr/bin/builder.sh
  5. ARG version="1.0.5"
  6. RUN VERSION=${version} /bin/sh /usr/bin/builder.sh
  7. FROM alpine:latest
  8. ENV CADDY_VERSION=1.0.5
  9. ENV CADDYPATH=/caddy/certs
  10. RUN apk add --no-cache \
  11. ca-certificates \
  12. git \
  13. mailcap \
  14. openssh-client \
  15. tzdata
  16. COPY --from=builder /install/caddy /usr/bin/caddy
  17. RUN /usr/bin/caddy -version
  18. RUN /usr/bin/caddy -plugins
  19. EXPOSE 80 443 2015
  20. VOLUME /root/.caddy /www
  21. WORKDIR /www
  22. COPY Caddyfile /caddy/Caddyfile
  23. CMD ["caddy","--conf", "/caddy/Caddyfile", "--log", "stdout", "--agree"]