Browse Source

Cron is added for automated certificate renew

master
Blagovest Petrov 5 years ago
parent
commit
90001b4a64
  1. 17
      Dockerfile
  2. 4
      cron
  3. 3
      entrypoint.sh

17
Dockerfile

@ -1,12 +1,17 @@
FROM alpine:latest
MAINTAINER Blagovest Petrov
RUN apk --no-cache add curl openssl bash git
RUN git clone https://github.com/lukas2511/dehydrated.git /dehydrated
RUN apk del git
ENV WELLKNOWN /srv/acme-challenge
ENV BASEDIR /srv/data
WORKDIR /dehydrated
CMD ./dehydrated --register --accept-terms && ./dehydrated -c -d $CF_HOST
RUN apk --no-cache add curl openssl bash tini
RUN && curl -o /usr/local/bin/dehydrated https://raw.githubusercontent.com/lukas2511/dehydrated/master/dehydrated && \
chmod +x /usr/local/bin/dehydrated
COPY ./cron /etc/periodic/daily
VOLUME /dehydrated/certs
VOLUME /srv/data
WORKDIR /srv/data
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
CMD ["/usr/sbin/crond", "-f"]

4
cron

@ -0,0 +1,4 @@
#!/bin/bash
exec /usr/local/bin/dehydrated --register --accept-terms
exec /usr/local/bin/dehydrated -c -d $DOMAINS

3
entrypoint.sh

@ -0,0 +1,3 @@
#!/bin/sh
crond
Loading…
Cancel
Save