summaryrefslogtreecommitdiffstats
path: root/2.4
diff options
context:
space:
mode:
authorJamie Nguyen <j@jamielinux.com>2018-07-17 14:12:23 +0100
committerJamie Nguyen <j@jamielinux.com>2018-07-17 14:12:23 +0100
commit59dea2f00cbdc956af4ccfab8e4c15564668121e (patch)
tree7499bf1b9427e03982c3279f10e0b66c3cca776c /2.4
parentda253163d5352f5487d68d0ae30a1667482de1cb (diff)
downloadapache-59dea2f00cbdc956af4ccfab8e4c15564668121e.tar.gz
apache-59dea2f00cbdc956af4ccfab8e4c15564668121e.tar.bz2
apache-59dea2f00cbdc956af4ccfab8e4c15564668121e.tar.xz
apache-59dea2f00cbdc956af4ccfab8e4c15564668121e.zip
Move apk to Dockerfile
Diffstat (limited to '2.4')
-rw-r--r--2.4/Dockerfile4
-rwxr-xr-x2.4/docker-entrypoint.sh2
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