File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ ENV CERTBOT_DOMAIN="" \
6
6
CLOUDFLARE_API_TOKEN="" \
7
7
RENEWAL_INTERVAL=43200
8
8
9
- COPY --chmod=755 entrypoint.sh /entrypoint.sh
9
+ COPY --chmod=700 entrypoint.sh /entrypoint.sh
10
10
11
11
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ # Permissions must be created after volumes have been mounted; otherwise, windows file system permissions will override
4
+ # the permissions set within the container.
5
+ mkdir -p /etc/letsencrypt/accounts /var/log/letsencrypt /var/lib/letsencrypt
6
+ chmod 755 /etc/letsencrypt /var/lib/letsencrypt
7
+ chmod 700 /etc/letsencrypt/accounts /var/log/letsencrypt
8
+
3
9
cat << "EOF "
4
10
____________________
5
11
< Certbot, activate! >
@@ -43,7 +49,8 @@ run_certbot() {
43
49
--key-type " $CERTBOT_KEY_TYPE " \
44
50
--email " $CERTBOT_EMAIL " \
45
51
--agree-tos \
46
- --non-interactive
52
+ --non-interactive \
53
+ --strict-permissions
47
54
exit_code=$?
48
55
if [ $exit_code -ne 0 ]; then
49
56
echo " Error: certbot command failed with exit code $exit_code "
You can’t perform that action at this time.
0 commit comments