Dockerfile 1.0 KB

123456789101112131415161718192021222324252627282930
  1. FROM golang:1.12.10-alpine3.10 AS builder
  2. LABEL maintainer="joona@kuori.org"
  3. RUN apk add --update gcc musl-dev git figlet \
  4. && figlet -c Building ACME-DNS \
  5. && go get github.com/joohoi/acme-dns
  6. WORKDIR /go/src/github.com/joohoi/acme-dns
  7. RUN CGO_ENABLED=1 go build
  8. FROM alpine:3.10
  9. WORKDIR /root/
  10. COPY --from=builder /go/src/github.com/joohoi/acme-dns .
  11. COPY ./entrypoint.sh /entrypoint.sh
  12. RUN mkdir -p /etc/acme-dns && mkdir -p /var/lib/acme-dns && mkdir /etc/letsencrypt \
  13. && rm -rf ./config.cfg \
  14. && apk --no-cache add ca-certificates && update-ca-certificates \
  15. && apk --no-cache add py-requests certbot curl python2 sqlite bash git \
  16. && curl -o /etc/letsencrypt/acme-dns-auth.py \
  17. https://raw.githubusercontent.com/joohoi/acme-dns-certbot-joohoi/master/acme-dns-auth.py \
  18. && chmod 0700 /etc/letsencrypt/acme-dns-auth.py
  19. #VOLUME ["/etc/acme-dns", "/var/lib/acme-dns"]
  20. ENTRYPOINT ["/entrypoint.sh"]
  21. EXPOSE 53
  22. EXPOSE 53/udp
  23. CMD ["./acme-dns" "-c" "/pki/iru/wild/acme-dns/infoclinica.ru.config.cfg"]