Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion 8.9/apache-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ RUN { \
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
Expand Down
1 change: 0 additions & 1 deletion 8.9/fpm-alpine3.12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ RUN { \
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
Expand Down
1 change: 0 additions & 1 deletion 8.9/fpm-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ RUN { \
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
Expand Down
1 change: 0 additions & 1 deletion 9.0/apache-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ RUN { \
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
Expand Down
1 change: 0 additions & 1 deletion 9.0/fpm-alpine3.12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ RUN { \
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
Expand Down
1 change: 0 additions & 1 deletion 9.0/fpm-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ RUN { \
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
Expand Down
3 changes: 1 addition & 2 deletions 9.1/apache-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ RUN { \
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/
COPY --from=composer:2.0 /usr/bin/composer /usr/local/bin/

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION 9.1.2
Expand Down
3 changes: 1 addition & 2 deletions 9.1/fpm-alpine3.12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ RUN { \
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/
COPY --from=composer:2.0 /usr/bin/composer /usr/local/bin/

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION 9.1.2
Expand Down
3 changes: 1 addition & 2 deletions 9.1/fpm-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ RUN { \
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/
COPY --from=composer:2.0 /usr/bin/composer /usr/local/bin/

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION 9.1.2
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ RUN { \
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/
COPY --from=composer:%%COMPOSER_VERSION%% /usr/bin/composer /usr/local/bin/

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION %%VERSION%%
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ RUN { \
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/
COPY --from=composer:%%COMPOSER_VERSION%% /usr/bin/composer /usr/local/bin/

# https://www.drupal.org/node/3060/release
ENV DRUPAL_VERSION %%VERSION%%
Expand Down
22 changes: 17 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ declare -A phpVersions=(
[9.0]='7.4'
)

declare -A composerVersions=(
[8.9]='1.10' # https://github.com/drupal/drupal/blob/8.9.12/composer.lock#L4357-L4358
[9.0]='1.10' # https://github.com/drupal/drupal/blob/9.0.10/composer.lock#L4448-L4449
[9.1]='2.0' # https://github.com/drupal/drupal/blob/9.1.2/composer.lock#L4730-L4731
)

for version in "${versions[@]}"; do
rcGrepV='-v'
rcVersion="${version%-rc}"
Expand Down Expand Up @@ -68,16 +74,22 @@ for version in "${versions[@]}"; do
fi

phpImage="${phpVersions[$version]:-$defaultPhpVersion}-$variant"
sedArgs=(
-e 's/%%PHP_VERSION%%/'"${phpImage}"'/'
-e 's/%%VERSION%%/'"$fullVersion"'/'
-e 's/%%MD5%%/'"$md5"'/'
)

template="Dockerfile-$dist.template"
if [ "$version" = '7' ]; then
# 7 has no release in drupal/recommended-project
# so its Dockerfile is based on the old template
template="Dockerfile-7-$dist.template"
else
composerVersion="${composerVersions[$version]}"
sedArgs+=( -e 's/%%COMPOSER_VERSION%%/'"$composerVersion"'/' )
fi
sed -r \
-e 's/%%PHP_VERSION%%/'"${phpImage}"'/' \
-e 's/%%VERSION%%/'"$fullVersion"'/' \
-e 's/%%MD5%%/'"$md5"'/' \
"$template" > "$version/$variant/Dockerfile"

sed -r "${sedArgs[@]}" "$template" > "$version/$variant/Dockerfile"
done
done