diff --git a/7/Dockerfile.alpine-apache b/7/Dockerfile.alpine-apache index 0e5515a..ac6e64a 100644 --- a/7/Dockerfile.alpine-apache +++ b/7/Dockerfile.alpine-apache @@ -13,14 +13,23 @@ ARG WITH_DATABASE=false ENV WITH_APACHE=${WITH_APACHE} ENV WITH_DATABASE=${WITH_DATABASE} +ENV APP_ROOT=${SERVER_ROOT}/htdocs ADD scripts/apache-entrypoint.sh /usr/local/bin/entrypoint +ADD htdocs ${APP_ROOT} # Create directory, and install required php app RUN /bin/sh /tmp/setup.sh; \ /bin/rm -f /tmp/*.sh; \ rm -vrf /var/cache/apk/*; \ - chmod +rx /usr/local/bin/entrypoint ; + chmod +rx /usr/local/bin/entrypoint ; \ + sed -i "s|#version#|${PHP_VERSION}|" /app/htdocs/index.html ; \ + sed -i "s|#os#|alpine|" /app/htdocs/index.html ; \ + mkdir -p ${SERVER_ROOT}/logs ${SERVER_ROOT}/run /run/apache2 ; \ + ln -s /usr/lib/apache2 ${SERVER_ROOT}/modules ; \ + chmod -R 755 ${SERVER_ROOT}/logs ${SERVER_ROOT/run} ; \ + chown -R apache:apache ${SERVER_ROOT}/htdocs ${SERVER_ROOT}/logs ${SERVER_ROOT}/run /run/apache2 ; \ + rm -vrf /var/cache/apk/* FROM scratch diff --git a/htdocs/index.html b/htdocs/index.html index 93e53fd..6be1521 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -12,7 +12,7 @@
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.