Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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 figlet email \
  17. && pip3 install certbot \
  18. && ln -sf /usr/bin/python3 /usr/bin/python \
  19. && curl -o /etc/letsencrypt/acme-dns-auth.py \
  20. https://raw.githubusercontent.com/joohoi/acme-dns-certbot-joohoi/master/acme-dns-auth.py \
  21. && chmod 0700 /etc/letsencrypt/acme-dns-auth.py \
  22. && sed -i "s/MY_NAME = \'Your Real Name\'/MY_NAME = \'jenkins.dev\'/" /etc/email/email.conf
  23. ENTRYPOINT ["/entrypoint.sh"]
  24. EXPOSE 53
  25. EXPOSE 53/udp