Dockerfile 991 B

1234567891011121314151617181920212223242526272829
  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 \
  4. && go get github.com/joohoi/acme-dns
  5. WORKDIR /go/src/github.com/joohoi/acme-dns
  6. RUN CGO_ENABLED=1 go build
  7. FROM alpine:3.10
  8. WORKDIR /root/
  9. COPY --from=builder /go/src/github.com/joohoi/acme-dns .
  10. COPY ./entrypoint.sh /entrypoint.sh
  11. RUN mkdir -p /etc/acme-dns && mkdir -p /var/lib/acme-dns && mkdir /etc/letsencrypt \
  12. && rm -rf ./config.cfg \
  13. && apk --no-cache add ca-certificates && update-ca-certificates \
  14. && apk --no-cache add py-requests certbot curl python2 sqlite bash git \
  15. && curl -o /etc/letsencrypt/acme-dns-auth.py \
  16. https://raw.githubusercontent.com/joohoi/acme-dns-certbot-joohoi/master/acme-dns-auth.py \
  17. && chmod 0700 /etc/letsencrypt/acme-dns-auth.py
  18. #VOLUME ["/etc/acme-dns", "/var/lib/acme-dns"]
  19. ENTRYPOINT ["/entrypoint.sh"]
  20. EXPOSE 53
  21. EXPOSE 53/udp
  22. CMD ["./acme-dns" "-c" "/pki/iru/wild/acme-dns/infoclinica.ru.config.cfg"]