Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Fix Docker build, optimize image.
Browse files Browse the repository at this point in the history
  • Loading branch information
brndnmtthws committed Jul 1, 2016
1 parent ad34fe4 commit 1275b45
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
26 changes: 16 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions letsencrypt-dcos.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "/letsencrypt-dcos",
"cpus": 0.05,
"mem": 64,
"mem": 512,
"instances": 1,
"container": {
"type": "DOCKER",
Expand All @@ -20,7 +20,7 @@
}
],
"docker": {
"image": "mesosphere/letsencrypt-dcos:v1.0.1",
"image": "mesosphere/letsencrypt-dcos:v1.0.3",
"network": "BRIDGE",
"portMappings": [
{
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1275b45

Please sign in to comment.