diff --git a/10.0/apache/Dockerfile b/10.0/apache/Dockerfile index 330af97..dc53fad 100644 --- a/10.0/apache/Dockerfile +++ b/10.0/apache/Dockerfile @@ -1,7 +1,10 @@ -# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended") -# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)") -# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0") -FROM php:7.0-apache +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM php:7.2-apache RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ @@ -11,7 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libicu-dev \ libjpeg-dev \ libldap2-dev \ - libmcrypt-dev \ libmemcached-dev \ libpng-dev \ libpq-dev \ @@ -29,8 +31,6 @@ RUN set -ex; \ gd \ intl \ ldap \ - mbstring \ - mcrypt \ opcache \ pcntl \ pdo_mysql \ diff --git a/10.0/fpm/Dockerfile b/10.0/fpm/Dockerfile index 0652c8c..5d7cc81 100644 --- a/10.0/fpm/Dockerfile +++ b/10.0/fpm/Dockerfile @@ -1,7 +1,10 @@ -# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended") -# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)") -# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0") -FROM php:7.0-fpm +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM php:7.2-fpm RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ @@ -11,7 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libicu-dev \ libjpeg-dev \ libldap2-dev \ - libmcrypt-dev \ libmemcached-dev \ libpng-dev \ libpq-dev \ @@ -29,8 +31,6 @@ RUN set -ex; \ gd \ intl \ ldap \ - mbstring \ - mcrypt \ opcache \ pcntl \ pdo_mysql \ diff --git a/9.1/apache/Dockerfile b/9.1/apache/Dockerfile index 60b41ee..777e23e 100644 --- a/9.1/apache/Dockerfile +++ b/9.1/apache/Dockerfile @@ -1,6 +1,9 @@ -# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended") -# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)") -# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0") +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM php:7.0-apache RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -29,7 +32,6 @@ RUN set -ex; \ gd \ intl \ ldap \ - mbstring \ mcrypt \ opcache \ pcntl \ diff --git a/9.1/fpm/Dockerfile b/9.1/fpm/Dockerfile index 2491f7b..23cf34c 100644 --- a/9.1/fpm/Dockerfile +++ b/9.1/fpm/Dockerfile @@ -1,6 +1,9 @@ -# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended") -# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)") -# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0") +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM php:7.0-fpm RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -29,7 +32,6 @@ RUN set -ex; \ gd \ intl \ ldap \ - mbstring \ mcrypt \ opcache \ pcntl \ diff --git a/Dockerfile.template b/Dockerfile.template index 7fa1c6a..050672d 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,7 +1,4 @@ -# https://owncloud.com/minimum-product-requirements/ ("5.6 recommended") -# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("PHP (5.6+ or 7.0+)") -# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0") -FROM php:7.0-%%VARIANT%% +FROM php:%%VARIANT%% RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ @@ -29,7 +26,6 @@ RUN set -ex; \ gd \ intl \ ldap \ - mbstring \ mcrypt \ opcache \ pcntl \ diff --git a/update.sh b/update.sh index 04a4f1d..3c5f1ab 100755 --- a/update.sh +++ b/update.sh @@ -6,6 +6,24 @@ declare -A cmd=( [fpm]='php-fpm' ) +# https://doc.owncloud.org/server/10.0/admin_manual/installation/system_requirements.html ("*We strongly encourage you to migrate to PHP 7.2.") +# https://doc.owncloud.org/server/9.0/admin_manual/installation/system_requirements.html ("PHP 7.0") +defaultPhpVersion='7.2' +declare -A phpVersion=( + [9.1]='7.0' +) + +generated_warning() { + cat <<-EOH + # + # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" + # + # PLEASE DO NOT EDIT IT DIRECTLY. + # + + EOH +} + cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" #Supported Versions found from Production Channel https://owncloud.org/release-channels/ versions=( "$@" ) @@ -47,20 +65,23 @@ for version in "${versions[@]}"; do echo "$version: $fullVersion" for variant in apache fpm; do - sed -r \ - -e 's/%%VARIANT%%/'"$variant"'/' \ + { generated_warning; cat Dockerfile.template; } > "$version/$variant/Dockerfile" + sed -ri \ + -e 's/%%VARIANT%%/'"${phpVersion[$version]:-$defaultPhpVersion}-$variant"'/' \ -e 's/%%VERSION%%/'"$fullVersion"'/' \ -e 's/%%SHA256%%/'"$sha256"'/' \ -e 's/%%CMD%%/'"${cmd[$variant]}"'/' \ - Dockerfile.template \ - > "$version/$variant/Dockerfile" + "$version/$variant/Dockerfile" if [ "$variant" = 'fpm' ]; then sed -ri -e '/a2enmod/d' "$version/$variant/Dockerfile" fi if [[ "$version" != 9.* ]]; then - sed -ri -e '/^RUN ln.*docker-entrypoint.*backwards compat/d' "$version/$variant/Dockerfile" + sed -ri \ + -e '/^RUN ln.*docker-entrypoint.*backwards compat/d' \ + -e '/mcrypt/d' \ + "$version/$variant/Dockerfile" fi travisEnv='\n - VERSION='"$version"' VARIANT='"$variant$travisEnv"