0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-01-24 06:33:54 +01:00

Upgrade PHP to 7.4 for 19.0 (#1108)

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
This commit is contained in:
J0WI 2020-05-23 22:34:08 +00:00 committed by GitHub
parent ccdf46609f
commit ba1500b05e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 18 deletions

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template # DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.3-apache-buster FROM php:7.4-apache-buster
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -41,9 +41,7 @@ RUN set -ex; \
; \ ; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
if [ ! -e /usr/include/gmp.h ]; then ln -s /usr/include/$debMultiarch/gmp.h /usr/include/gmp.h; fi;\ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
docker-php-ext-configure gmp --with-gmp="/usr/include/$debMultiarch"; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \
exif \ exif \

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.3-fpm-alpine3.11 FROM php:7.4-fpm-alpine3.11
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -35,7 +35,7 @@ RUN set -ex; \
gmp-dev \ gmp-dev \
; \ ; \
\ \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-configure ldap; \ docker-php-ext-configure ldap; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \
exif \ exif \

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template # DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.3-fpm-buster FROM php:7.4-fpm-buster
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -41,9 +41,7 @@ RUN set -ex; \
; \ ; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
if [ ! -e /usr/include/gmp.h ]; then ln -s /usr/include/$debMultiarch/gmp.h /usr/include/gmp.h; fi;\ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
docker-php-ext-configure gmp --with-gmp="/usr/include/$debMultiarch"; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \
exif \ exif \

View file

@ -34,7 +34,7 @@ RUN set -ex; \
gmp-dev \ gmp-dev \
; \ ; \
\ \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-configure ldap; \ docker-php-ext-configure ldap; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \
exif \ exif \

View file

@ -41,7 +41,7 @@ RUN set -ex; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
if [ ! -e /usr/include/gmp.h ]; then ln -s /usr/include/$debMultiarch/gmp.h /usr/include/gmp.h; fi;\ if [ ! -e /usr/include/gmp.h ]; then ln -s /usr/include/$debMultiarch/gmp.h /usr/include/gmp.h; fi;\
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \ docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
docker-php-ext-configure gmp --with-gmp="/usr/include/$debMultiarch"; \ docker-php-ext-configure gmp --with-gmp="/usr/include/$debMultiarch"; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \

View file

@ -2,7 +2,10 @@
set -eo pipefail set -eo pipefail
declare -A php_version=( declare -A php_version=(
[default]='7.3' [default]='7.4'
[18.0]='7.3'
[17.0]='7.3'
[16.0]='7.3'
) )
declare -A cmd=( declare -A cmd=(
@ -130,11 +133,19 @@ function create_variant() {
s/%%CRONTAB_INT%%/'"$crontabInt"'/g; s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
' "$dir/Dockerfile" ' "$dir/Dockerfile"
if [[ "$phpVersion" != 7.3 ]]; then case "$phpVersion" in
sed -ri \ 7.4 )
-e '/libzip-dev/d' \ sed -ri -e '
"$dir/Dockerfile" \@docker-php-ext-configure gmp --with-gmp@d;
fi \@/usr/include/gmp.h@d;
' "$dir/Dockerfile"
;;
7.3 )
sed -ri -e '
s@gd --with-freetype --with-jpeg --with-webp@gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr@g;
' "$dir/Dockerfile"
;;
esac
# Copy the shell scripts # Copy the shell scripts
for name in entrypoint cron; do for name in entrypoint cron; do