-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PHP 8.0 for Nextcloud 22 image #1421
Comments
The main issue is, that the latest released version of imagick (3.4.4) that is shipped with |
works for me. diff --git a/21.0/apache/Dockerfile b/21.0/apache/Dockerfile
index 52fab6e..ba6f3bf 100644
--- a/21.0/apache/Dockerfile
+++ b/21.0/apache/Dockerfile
@@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
-FROM php:7.4-apache-buster
+FROM php:8.0-apache-buster
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
@@ -60,10 +60,12 @@ RUN set -ex; \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
- pecl install APCu-5.1.19; \
- pecl install memcached-3.1.5; \
- pecl install redis-5.3.3; \
- pecl install imagick-3.4.4; \
+ pecl install APCu; \
+ pecl install memcached; \
+ pecl install redis; \
+ mkdir -p /usr/src/php/ext/imagick; \
+ curl -fsSL https://github.com/Imagick/imagick/archive/06116aa24b76edaf6b1693198f79e6c295eda8a9.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1; \
+ docker-php-ext-install imagick; \
\
docker-php-ext-enable \
apcu \
@@ -130,17 +132,12 @@ RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
\
- curl -fsSL -o nextcloud.tar.bz2 \
- "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
- curl -fsSL -o nextcloud.tar.bz2.asc \
- "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
- export GNUPGHOME="$(mktemp -d)"; \
-# gpg key from https://nextcloud.com/nextcloud.asc
- gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
- gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
- tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
+ curl -fsSL -o nextcloud.tar.gz \
+ "https://github.com/nextcloud/server/archive/v${NEXTCLOUD_VERSION}.tar.gz"; \
+ tar -xf nextcloud.tar.gz -C /usr/src/; \
+ mv /usr/src/server-21.0.0 /usr/src/nextcloud; \
gpgconf --kill all; \
- rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
+ rm nextcloud.tar.*; \
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
mkdir -p /usr/src/nextcloud/data; \
mkdir -p /usr/src/nextcloud/custom_apps; \ |
PHP 7.4 is still the recommend version and 8.0 is not mentioned at all: https://docs.nextcloud.com/server/21/admin_manual/installation/system_requirements.html |
It is actually stated in the announcements itself "...The move to PHP 8 will also give a nice performance boost for systems that have it installed!..." -> https://nextcloud.com/blog/nextcloud-faster-than-ever-introducing-files-high-performance-back-end/. You could see this as an recommendation to use php 8 ;-) But I do understand the desire to have only released php plugins installed and pinned to a version. But I think in the past there were similar problems with imagick, it holds back a general upgrade. Maybe there can be a dedicated dockerfile (-> image) with php8? even though it can get a configuration hell.. |
You can easily install imagick on php 8.0 with https://github.com/mlocati/docker-php-extension-installer |
With the release of imagick 3.5.0 (2021-06-17) it now supports PHP 8. So there should be no technical limitation to providing PHP 8 based NextCloud images. |
Maybe this will change for Nextcloud 22. There are still some open bugs at https://github.com/nextcloud/server |
Most upstream bugs are tracked at nextcloud/server#25806 |
PHP 8 is now the officially recommended version on the system requirements page. I hope this means the docker images will soon be updated to use it (21.0.4 and 22.1.0 don't). |
I upgraded my Nextcloud 21 to PHP8.0, and I can feel the better performances. A worthy upgrade. |
The current Nextcloud 21 image still uses PHP 7.4. Nextcloud 21 supports PHP 8.0 and it gives some performance improvements, so it would be awesome if the Nextcloud 21 image uses PHP 8.0.
The text was updated successfully, but these errors were encountered: