diff options
Diffstat (limited to '2.4')
-rw-r--r-- | 2.4/Dockerfile | 4 | ||||
-rwxr-xr-x | 2.4/docker-entrypoint.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/2.4/Dockerfile b/2.4/Dockerfile index 58e3ea7..791046c 100644 --- a/2.4/Dockerfile +++ b/2.4/Dockerfile @@ -45,7 +45,9 @@ RUN set -ex; \ mkdir -p "$HTTPD_PREFIX/conf/conf-enabled"; \ mkdir -p "$HTTPD_PREFIX/conf/sites-enabled"; \ ln -s ../conf-available/dav.conf "$HTTPD_PREFIX/conf/conf-enabled"; \ - ln -s ../sites-available/default.conf "$HTTPD_PREFIX/conf/sites-enabled" + ln -s ../sites-available/default.conf "$HTTPD_PREFIX/conf/sites-enabled"; \ + # Install openssl if we need to generate a self-signed certificate. + apk add --no-cache openssl COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh EXPOSE 80/tcp 443/tcp diff --git a/2.4/docker-entrypoint.sh b/2.4/docker-entrypoint.sh index 8531931..5840b23 100755 --- a/2.4/docker-entrypoint.sh +++ b/2.4/docker-entrypoint.sh @@ -80,10 +80,8 @@ if [ "${SSL_CERT:-none}" = "selfsigned" ]; then # Generate self-signed SSL certificate. # If SERVER_NAMES is given, use the first domain as the Common Name. if [ ! -e /privkey.pem ] || [ ! -e /cert.pem ]; then - apk add --no-cache openssl openssl req -x509 -newkey rsa:2048 -days 1000 -nodes \ -keyout /privkey.pem -out /cert.pem -subj "/CN=${SERVER_NAME:-selfsigned}" - apk del --no-cache openssl fi fi |