Dockerfile 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. FROM golang:1.13.5-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 /
  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 curl sqlite bash git openssh-client \
  16. openssl openssl-dev python3 python3-dev musl-dev sqlite gcc libffi-dev \
  17. && pip3 install certbot \
  18. && curl -o /etc/letsencrypt/acme-dns-auth.py \
  19. https://raw.githubusercontent.com/joohoi/acme-dns-certbot-joohoi/master/acme-dns-auth.py \
  20. && chmod 0700 /etc/letsencrypt/acme-dns-auth.py
  21. #VOLUME ["/etc/acme-dns", "/var/lib/acme-dns"]
  22. ENTRYPOINT ["/entrypoint.sh"]
  23. EXPOSE 53
  24. EXPOSE 53/udp
  25. CMD ["./acme-dns", "-c", "/pki/iru/wild/acme-dns/infoclinica.ru.config.cfg"]