diff --git a/apache/docker-entrypoint.sh b/apache/docker-entrypoint.sh index b9f3863..1622e0d 100755 --- a/apache/docker-entrypoint.sh +++ b/apache/docker-entrypoint.sh @@ -43,6 +43,13 @@ if ! [ -e index.php -a -e libraries/cms/version/version.php ]; then fi tar cf - --one-file-system -C /usr/src/joomla . | tar xf - + + if [ ! -e .htaccess ]; then + # NOTE: The "Indexes" option is disabled in the php:apache base image so we use a customized .htaccess + cp /joomla-htaccess .htaccess + chown www-data:www-data .htaccess + fi + echo >&2 "Complete! Joomla has been successfully copied to $(pwd)" fi diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b9f3863..1622e0d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -43,6 +43,13 @@ if ! [ -e index.php -a -e libraries/cms/version/version.php ]; then fi tar cf - --one-file-system -C /usr/src/joomla . | tar xf - + + if [ ! -e .htaccess ]; then + # NOTE: The "Indexes" option is disabled in the php:apache base image so we use a customized .htaccess + cp /joomla-htaccess .htaccess + chown www-data:www-data .htaccess + fi + echo >&2 "Complete! Joomla has been successfully copied to $(pwd)" fi diff --git a/fpm/docker-entrypoint.sh b/fpm/docker-entrypoint.sh index b9f3863..1622e0d 100755 --- a/fpm/docker-entrypoint.sh +++ b/fpm/docker-entrypoint.sh @@ -43,6 +43,13 @@ if ! [ -e index.php -a -e libraries/cms/version/version.php ]; then fi tar cf - --one-file-system -C /usr/src/joomla . | tar xf - + + if [ ! -e .htaccess ]; then + # NOTE: The "Indexes" option is disabled in the php:apache base image so we use a customized .htaccess + cp /joomla-htaccess .htaccess + chown www-data:www-data .htaccess + fi + echo >&2 "Complete! Joomla has been successfully copied to $(pwd)" fi