diff --git a/7/apache-buster/Dockerfile b/7/apache-buster/Dockerfile index 61f69998e..677413647 100644 --- a/7/apache-buster/Dockerfile +++ b/7/apache-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-apache-buster # install the PHP extensions we need diff --git a/7/fpm-alpine3.12/Dockerfile b/7/fpm-alpine3.12/Dockerfile index bff53b6b9..81f2c49cd 100644 --- a/7/fpm-alpine3.12/Dockerfile +++ b/7/fpm-alpine3.12/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-alpine3.12 # install the PHP extensions we need diff --git a/7/fpm-buster/Dockerfile b/7/fpm-buster/Dockerfile index 393731862..4837f8f88 100644 --- a/7/fpm-buster/Dockerfile +++ b/7/fpm-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-buster # install the PHP extensions we need diff --git a/8.8/apache-buster/Dockerfile b/8.8/apache-buster/Dockerfile index e46e392aa..ce74293b9 100644 --- a/8.8/apache-buster/Dockerfile +++ b/8.8/apache-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-apache-buster # install the PHP extensions we need diff --git a/8.8/fpm-alpine3.12/Dockerfile b/8.8/fpm-alpine3.12/Dockerfile index 01984045d..bb92858d3 100644 --- a/8.8/fpm-alpine3.12/Dockerfile +++ b/8.8/fpm-alpine3.12/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-alpine3.12 # install the PHP extensions we need diff --git a/8.8/fpm-buster/Dockerfile b/8.8/fpm-buster/Dockerfile index 25f20680c..c3d4c9d7c 100644 --- a/8.8/fpm-buster/Dockerfile +++ b/8.8/fpm-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-buster # install the PHP extensions we need diff --git a/8.9/apache-buster/Dockerfile b/8.9/apache-buster/Dockerfile index cf513c285..0e4aa2a18 100644 --- a/8.9/apache-buster/Dockerfile +++ b/8.9/apache-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-apache-buster # install the PHP extensions we need diff --git a/8.9/fpm-alpine3.12/Dockerfile b/8.9/fpm-alpine3.12/Dockerfile index d7fd218ea..3ac20d569 100644 --- a/8.9/fpm-alpine3.12/Dockerfile +++ b/8.9/fpm-alpine3.12/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-alpine3.12 # install the PHP extensions we need diff --git a/8.9/fpm-buster/Dockerfile b/8.9/fpm-buster/Dockerfile index 15ccb6c2b..24e6262fa 100644 --- a/8.9/fpm-buster/Dockerfile +++ b/8.9/fpm-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-buster # install the PHP extensions we need diff --git a/9.0/apache-buster/Dockerfile b/9.0/apache-buster/Dockerfile index fdd28b439..48a07109b 100644 --- a/9.0/apache-buster/Dockerfile +++ b/9.0/apache-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-apache-buster # install the PHP extensions we need diff --git a/9.0/fpm-alpine3.12/Dockerfile b/9.0/fpm-alpine3.12/Dockerfile index dc9a59395..090200f79 100644 --- a/9.0/fpm-alpine3.12/Dockerfile +++ b/9.0/fpm-alpine3.12/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-alpine3.12 # install the PHP extensions we need diff --git a/9.0/fpm-buster/Dockerfile b/9.0/fpm-buster/Dockerfile index 6648ea9ae..ffafea8a9 100644 --- a/9.0/fpm-buster/Dockerfile +++ b/9.0/fpm-buster/Dockerfile @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:7.4-fpm-buster # install the PHP extensions we need diff --git a/9.1/apache-buster/Dockerfile b/9.1/apache-buster/Dockerfile new file mode 100644 index 000000000..754a37bc4 --- /dev/null +++ b/9.1/apache-buster/Dockerfile @@ -0,0 +1,77 @@ +# from https://www.drupal.org/docs/system-requirements/php-requirements +FROM php:8.0-apache-buster + +# install the PHP extensions we need +RUN set -eux; \ + \ + if command -v a2enmod; then \ + a2enmod rewrite; \ + fi; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libfreetype6-dev \ + libjpeg-dev \ + libpng-dev \ + libpq-dev \ + libzip-dev \ + ; \ + \ + docker-php-ext-configure gd \ + --with-freetype \ + --with-jpeg=/usr \ + ; \ + \ + docker-php-ext-install -j "$(nproc)" \ + gd \ + opcache \ + pdo_mysql \ + pdo_pgsql \ + zip \ + ; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { print $3 }' \ + | sort -u \ + | xargs -r dpkg-query -S \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://secure.php.net/manual/en/opcache.installation.php +RUN { \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.interned_strings_buffer=8'; \ + echo 'opcache.max_accelerated_files=4000'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.fast_shutdown=1'; \ + } > /usr/local/etc/php/conf.d/opcache-recommended.ini + +# https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053 +COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/ + +# https://www.drupal.org/node/3060/release +ENV DRUPAL_VERSION 9.1.0 + +WORKDIR /opt/drupal +RUN set -eux; \ + export COMPOSER_HOME="$(mktemp -d)"; \ + composer create-project --no-interaction "drupal/recommended-project:$DRUPAL_VERSION" ./; \ + chown -R www-data:www-data web/sites web/modules web/themes; \ + rmdir /var/www/html; \ + ln -sf /opt/drupal/web /var/www/html; \ + # delete composer cache + rm -rf "$COMPOSER_HOME" + +ENV PATH=${PATH}:/opt/drupal/vendor/bin + +# vim:set ft=dockerfile: diff --git a/9.1/fpm-alpine3.12/Dockerfile b/9.1/fpm-alpine3.12/Dockerfile new file mode 100644 index 000000000..8fddfa7f1 --- /dev/null +++ b/9.1/fpm-alpine3.12/Dockerfile @@ -0,0 +1,67 @@ +# from https://www.drupal.org/docs/system-requirements/php-requirements +FROM php:8.0-fpm-alpine3.12 + +# install the PHP extensions we need +# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642 +RUN set -eux; \ + \ + apk add --no-cache --virtual .build-deps \ + coreutils \ + freetype-dev \ + libjpeg-turbo-dev \ + libpng-dev \ + libzip-dev \ + postgresql-dev \ + ; \ + \ + docker-php-ext-configure gd \ + --with-freetype \ + --with-jpeg=/usr/include \ + ; \ + \ + docker-php-ext-install -j "$(nproc)" \ + gd \ + opcache \ + pdo_mysql \ + pdo_pgsql \ + zip \ + ; \ + \ + runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )"; \ + apk add --virtual .drupal-phpexts-rundeps $runDeps; \ + apk del .build-deps + +# set recommended PHP.ini settings +# see https://secure.php.net/manual/en/opcache.installation.php +RUN { \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.interned_strings_buffer=8'; \ + echo 'opcache.max_accelerated_files=4000'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.fast_shutdown=1'; \ + } > /usr/local/etc/php/conf.d/opcache-recommended.ini + +# https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053 +COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/ + +# https://www.drupal.org/node/3060/release +ENV DRUPAL_VERSION 9.1.0 + +WORKDIR /opt/drupal +RUN set -eux; \ + export COMPOSER_HOME="$(mktemp -d)"; \ + composer create-project --no-interaction "drupal/recommended-project:$DRUPAL_VERSION" ./; \ + chown -R www-data:www-data web/sites web/modules web/themes; \ + rmdir /var/www/html; \ + ln -sf /opt/drupal/web /var/www/html; \ + # delete composer cache + rm -rf "$COMPOSER_HOME" + +ENV PATH=${PATH}:/opt/drupal/vendor/bin + +# vim:set ft=dockerfile: diff --git a/9.1/fpm-buster/Dockerfile b/9.1/fpm-buster/Dockerfile new file mode 100644 index 000000000..3cde533fa --- /dev/null +++ b/9.1/fpm-buster/Dockerfile @@ -0,0 +1,77 @@ +# from https://www.drupal.org/docs/system-requirements/php-requirements +FROM php:8.0-fpm-buster + +# install the PHP extensions we need +RUN set -eux; \ + \ + if command -v a2enmod; then \ + a2enmod rewrite; \ + fi; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libfreetype6-dev \ + libjpeg-dev \ + libpng-dev \ + libpq-dev \ + libzip-dev \ + ; \ + \ + docker-php-ext-configure gd \ + --with-freetype \ + --with-jpeg=/usr \ + ; \ + \ + docker-php-ext-install -j "$(nproc)" \ + gd \ + opcache \ + pdo_mysql \ + pdo_pgsql \ + zip \ + ; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { print $3 }' \ + | sort -u \ + | xargs -r dpkg-query -S \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://secure.php.net/manual/en/opcache.installation.php +RUN { \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.interned_strings_buffer=8'; \ + echo 'opcache.max_accelerated_files=4000'; \ + echo 'opcache.revalidate_freq=60'; \ + echo 'opcache.fast_shutdown=1'; \ + } > /usr/local/etc/php/conf.d/opcache-recommended.ini + +# https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053 +COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/ + +# https://www.drupal.org/node/3060/release +ENV DRUPAL_VERSION 9.1.0 + +WORKDIR /opt/drupal +RUN set -eux; \ + export COMPOSER_HOME="$(mktemp -d)"; \ + composer create-project --no-interaction "drupal/recommended-project:$DRUPAL_VERSION" ./; \ + chown -R www-data:www-data web/sites web/modules web/themes; \ + rmdir /var/www/html; \ + ln -sf /opt/drupal/web /var/www/html; \ + # delete composer cache + rm -rf "$COMPOSER_HOME" + +ENV PATH=${PATH}:/opt/drupal/vendor/bin + +# vim:set ft=dockerfile: diff --git a/Dockerfile-7-alpine.template b/Dockerfile-7-alpine.template index 5dc80be0a..f8c3e7744 100644 --- a/Dockerfile-7-alpine.template +++ b/Dockerfile-7-alpine.template @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:%%PHP_VERSION%% # install the PHP extensions we need diff --git a/Dockerfile-7-debian.template b/Dockerfile-7-debian.template index 1519758d5..82dc4cc8e 100644 --- a/Dockerfile-7-debian.template +++ b/Dockerfile-7-debian.template @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:%%PHP_VERSION%% # install the PHP extensions we need diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 8ef60e33c..7fd2057f6 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:%%PHP_VERSION%% # install the PHP extensions we need diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index a1d586b17..b032e15a3 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -1,4 +1,4 @@ -# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements +# from https://www.drupal.org/docs/system-requirements/php-requirements FROM php:%%PHP_VERSION%% # install the PHP extensions we need diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index dda939c0c..d99810d7b 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,8 +3,8 @@ set -Eeuo pipefail declare -A aliases=( [8.9]='8' - [9.0]='9 latest' - [9.1-rc]='rc' + [9.1]='9 latest' + [9.2-rc]='rc' ) defaultDebianSuite='buster' diff --git a/update.sh b/update.sh index b48429239..52d079d80 100755 --- a/update.sh +++ b/update.sh @@ -10,10 +10,13 @@ fi versions=( "${versions[@]%/}" ) # https://www.drupal.org/docs/8/system-requirements/php-requirements#php_required -defaultPhpVersion='7.4' +defaultPhpVersion='8.0' declare -A phpVersions=( # https://www.drupal.org/docs/7/system-requirements/php-requirements#php_required - #[7]='7.2' + [7]='7.4' + [8.8]='7.4' + [8.9]='7.4' + [9.0]='7.4' ) for version in "${versions[@]}"; do