diff --git a/Dockerfile b/Dockerfile index 47d2315..30cb899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,23 @@ FROM debian:jessie WORKDIR / -RUN apt-get update && apt-get install -y unzip curl python-requests -RUN curl -Ls -o /master.zip https://github.com/certbot/certbot/archive/master.zip -RUN unzip master.zip \ - && cd certbot-master \ - && ./certbot-auto --help \ - && apt-get clean && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=noninteractive +ENV CERTBOT_VERSION=0.8.1 +RUN apt-get update \ + && apt-get install -y unzip curl python-pip \ + && pip install --upgrade pip \ + && pip install virtualenv --upgrade \ + && curl -Ls -o /certbot.zip https://github.com/certbot/certbot/archive/v${CERTBOT_VERSION}.zip \ + && unzip certbot.zip \ + && mv certbot-${CERTBOT_VERSION} certbot \ + && cd certbot \ + && ./certbot-auto --os-packages-only --noninteractive \ + && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* EXPOSE 80 -WORKDIR /certbot-master -COPY run.sh /certbot-master/run.sh -COPY post_cert.py /certbot-master/post_cert.py +WORKDIR /certbot +COPY run.sh /certbot/run.sh +COPY post_cert.py /certbot/post_cert.py -ENTRYPOINT ["/certbot-master/run.sh"] +ENTRYPOINT ["/certbot/run.sh"] diff --git a/letsencrypt-dcos.json b/letsencrypt-dcos.json index 793b6db..2bfcf26 100644 --- a/letsencrypt-dcos.json +++ b/letsencrypt-dcos.json @@ -1,7 +1,7 @@ { "id": "/letsencrypt-dcos", "cpus": 0.05, - "mem": 64, + "mem": 512, "instances": 1, "container": { "type": "DOCKER", @@ -20,7 +20,7 @@ } ], "docker": { - "image": "mesosphere/letsencrypt-dcos:v1.0.1", + "image": "mesosphere/letsencrypt-dcos:v1.0.3", "network": "BRIDGE", "portMappings": [ { diff --git a/run.sh b/run.sh index af1c8ae..578a4db 100755 --- a/run.sh +++ b/run.sh @@ -25,7 +25,7 @@ echo "DOMAIN_FIRST: ${DOMAIN_FIRST}" echo "Running certbot-auto to generate initial signed cert" ./certbot-auto --no-self-upgrade certonly --standalone \ --standalone-supported-challenges http-01 $DOMAIN_ARGS \ - --email $LETSENCRYPT_EMAIL --agree-tos --non-interactive --no-redirect \ + --email $LETSENCRYPT_EMAIL --agree-tos --noninteractive --no-redirect \ --rsa-key-size 4096 --expand while [ true ]; do