nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
6.08k stars 1.83k forks source link

Image issue due to php-modules since Nextcloud 30 #2301

Closed DrZoidberg09 closed 1 month ago

DrZoidberg09 commented 1 month ago

When I want to run the docker image built for Nextcloud 30, I get this error:

2024-09-28 20:05:53 Can't start Nextcloud because the version of the data (0.0.0.0) is higher than the docker image version ( 2024-09-28 20:05:53 Warning: PHP Startup: Unable to load dynamic library 'memcached' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20220829/memcached (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/memcached: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20220829/memcached.so (libmemcached.so.11: cannot open shared object file: No such file or directory)) in Unknown on line 0 2024-09-28 20:05:53 2024-09-28 20:05:53 Warning: PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20220829/zip.so (libzip.so.4: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20220829/zip.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 2024-09-28 20:05:53 30.0.0.14) and downgrading is not supported. Are you sure you have pulled the newest image version?

If use the same Dockerfile with Nextcloud 29, everything is fine. Also when I inspect the image, these files exist.

Any ideas?

btw: it is built for ARM64

joshtrichards commented 1 month ago

The reason the version is 0.0.0.0 is presumably because your customized image has somehow broken the php binary (or it's ability to properly load at least), so the proper version info isn't being retrieved:

https://github.com/nextcloud/docker/blob/f6d767efb1c8853952c138f4b6429a2441fbe6e6/30/apache/entrypoint.sh#L144-L155

Behind that, without knowing what customizations you've made, it's impossible to do more than speculate.

P.S. Keep in mind this is a bug reporting channel more so than a support channel. You might try posting your Dockerfile at the help forum - https://help.nextcloud.com - for feedback.

joshtrichards commented 1 month ago

You might also search some of the closed issues to see what others that have encountered similar things with their custom images have discovered - e.g.

https://github.com/nextcloud/docker/issues/2002#issuecomment-1695055979

DrZoidberg09 commented 1 month ago

Thank you for your help!

That was it. The only thing I changed (besides installing some packages) was to pass the ENV NEXTCLOUD_VERSION per ARG from the docker build command. This is super handy, if you want to have an automatic deployment.

Hence, you are right it is not really a bug, but would be a pretty nice feature if that worked. With older entry-point.sh it was not a problem, but with newer versions it does not work anymore.