File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,17 @@ RUN set -ex && \
48
48
mkdir -p /etc/nginx/user_conf.d && \
49
49
chown www-data:www-data -R /var/www \
50
50
&& \
51
+ # Make sure there are no surprise config files inside the config folder.
52
+ rm -f /etc/nginx/conf.d/*
53
+
51
54
# Copy in our "default" Nginx server configurations, which make sure that the
52
55
# ACME challenge requests are correctly forwarded to certbot and then redirects
53
56
# everything else to HTTPS.
54
- rm -f /etc/nginx/conf.d/*
55
57
COPY nginx_conf.d/ /etc/nginx/conf.d/
56
58
57
59
# Copy in all our scripts and make them executable.
58
60
COPY scripts/ /scripts
59
61
RUN chmod +x -R /scripts && \
60
- chmod +x -R /docker-entrypoint.d && \
61
62
# Make so that the parent's entrypoint script is properly triggered (issue #21).
62
63
sed -ri '/^if \[ "\$ 1" = "nginx" -o "\$ 1" = "nginx-debug" \] ; then$/,${s//if echo "$1" | grep -q "nginx"; then/;b};$q1' /docker-entrypoint.sh
63
64
Original file line number Diff line number Diff line change @@ -39,17 +39,19 @@ RUN set -ex && \
39
39
# Create new directories and set correct permissions.
40
40
mkdir -p /var/www/letsencrypt && \
41
41
mkdir -p /etc/nginx/user_conf.d && \
42
- chown 82:82 -R /var/www && \
42
+ chown 82:82 -R /var/www \
43
+ && \
44
+ # Make sure there are no surprise config files inside the config folder.
45
+ rm -f /etc/nginx/conf.d/*
46
+
43
47
# Copy in our "default" Nginx server configurations, which make sure that the
44
48
# ACME challenge requests are correctly forwarded to certbot and then redirects
45
49
# everything else to HTTPS.
46
- rm -f /etc/nginx/conf.d/*
47
50
COPY nginx_conf.d/ /etc/nginx/conf.d/
48
51
49
52
# Copy in all our scripts and make them executable.
50
53
COPY scripts/ /scripts
51
54
RUN chmod +x -R /scripts && \
52
- chmod +x -R /docker-entrypoint.d && \
53
55
# Make so that the parent's entrypoint script is properly triggered (issue #21).
54
56
sed -ri '/^if \[ "\$1" = "nginx" -o "\$1" = "nginx-debug" \]; then$/,${s//if echo "$1" | grep -q "nginx"; then/;b};$q1' /docker-entrypoint.sh
55
57
You can’t perform that action at this time.
0 commit comments