File tree 5 files changed +16
-8
lines changed
5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change
1
+ *
2
+ ! docker-entrypoint.sh
Original file line number Diff line number Diff line change @@ -24,3 +24,4 @@ certbot.log
24
24
/* .pem
25
25
.env
26
26
env.list
27
+ letsencrypt
Original file line number Diff line number Diff line change 1
1
FROM python:3.6-alpine
2
- ENTRYPOINT [ "certbot" ]
3
2
4
3
VOLUME /etc/letsencrypt /var/lib/letsencrypt
5
4
WORKDIR /opt/certbot
6
5
6
+ COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
7
+ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
8
+
7
9
RUN apk add --no-cache --virtual .certbot-deps \
8
10
libffi \
9
11
libssl1.1 \
@@ -19,3 +21,6 @@ RUN apk add --no-cache --virtual .build-deps \
19
21
&& pip install urllib3==1.25.11 \
20
22
&& pip install certbot-s3front \
21
23
&& apk del .build-deps
24
+
25
+
26
+ ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ Then export the environment variables to an `env.list` file:
82
82
``` bash
83
83
echo AWS_ACCESS_KEY_ID=YOUR_ID >> env.list
84
84
echo AWS_SECRET_ACCESS_KEY=YOUR_KEY >> env.list
85
+ echo AWS_S3_BUCKET=YOUR_S3_BUCKET_NAME >> env.list
86
+ echo AWS_DISTRIBUTION_ID=YOUR_DISTRIBUTION_ID >> env.list
87
+ echo DOMAIN=YOUR_DOMAIN >> env.list
88
+ echo EMAIL=YOUR_EMAIL >> env.list
85
89
```
86
90
87
91
And finally run the docker image:
@@ -91,11 +95,4 @@ docker run --rm --name lets-encrypt -it \
91
95
-v ./letsencrypt/:/etc/letsencrypt \
92
96
--env-file env.list \
93
97
certbot-s3front \
94
- --init \
95
- --agree-tos \
96
- -a certbot-s3front:auth \
97
- -i certbot-s3front:installer \
98
- --certbot-s3front:auth-s3-bucket < YOUR_AWS_S3_BUCKET> \
99
- --certbot-s3front:installer-cf-distribution-id < YOUR_AWS_CLOUDFRONT_DISTRIBUTION_ID> \
100
- -d < YOUR_DOMAIN>
101
98
```
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ /usr/local/bin/certbot -n --init --agree-tos -a certbot-s3front:auth -i certbot-s3front:installer --certbot-s3front:auth-s3-bucket $AWS_S3_BUCKET --certbot-s3front:installer-cf-distribution-id $AWS_DISTRIBUTION_ID --email $EMAIL -d $DOMAIN
You can’t perform that action at this time.
0 commit comments