There more and more days passing beetween Nextcloud new version notification and its availablility https://hub.docker.com/_/nextcloud/tags

For example 2025-04-17 There is notification on  31.0.4 availability, but there is 31.0.3 is yet absent. Only 31.0.2 is available.

So there ia always Plan B. It is to bulild the image instead of downloading it.


Building Nextcloud 31.0.4

git clone https://github.com/nextcloud/docker.git
cd docker/31/apache/
sed -i 's/31.0.0/31.0.4/g' Dockerfile
sed -i 's/31.0.1/31.0.4/g' Dockerfile
sed -i 's/31.0.2/31.0.4/g' Dockerfile
sed -i 's/31.0.3/31.0.4/g' Dockerfile
#docker build -t nextcloud:31.0.4 .
docker build -t nextcloud .
docker image tag nextcloud:latest nextcloud:31.0.4


reinstall Nextcloud with the image

cd ~
sed -i 's/31.0.2/31.0.4/g' docker-compose.yml
docker compose ps
docker compose down
docker compose up -d --build --force-recreate
docker compose ps
docker compose logs --follow

logs showing something like

on cloud-server  | Initializing nextcloud 31.0.4.1 ...
cloud-server  | Upgrading nextcloud from 31.0.2.1 ...


  • No labels