I have an Owncloud 8 installation that I am migrating to Nextcloud, using the excellent nextcloud docker images (thank you!).
The migration is almost entirely scripted (with only the exception of a change in LDAP server details, which I do manually via the GUI) and was working fine every time I ran it including last night.
However, this morning the very same script is broken. At the very start of this whole process, I get this:
# docker exec -it nextcloud-9.0 bash -c "sudo -u www-data php occ upgrade"
This version of Nextcloud is not compatible with PHP 7.1.<br/>You are currently running 7.1.2.
Same if I try nextcloud-10.0 as well.
What has changed?
I donāt think itās relevant for this post, but my migration steps go something like:
- import SQL database from v8
- copy files from v8
- Create docker v9 instance; upgrade to v9
- Create docker v10 instance; upgrade to v10
- Create docker v11 instance; upgrade to v11
After attempting to put my new v11 instance live yesterday, I found I was hitting an error (I think this one) so I commented out the āupgrade to v11ā part of my script, thinking I would re-run it and just stay at v10 until Iād figured out a solution. But now, nothing works
FWIW, my docker build script is as follows - sorry, I couldnāt upload as an attachment so am pasting it in below. (From memory, the only reason I am grabbing the Dockerfile directly is because I was testing the apache variant when it was first being released) :
#!/bin/sh
if [ "$1" == "" ]; then
echo Usage: $0 version
echo e.g. $0 10.0
exit
fi
NEXTCLOUDVER=$1
if [ -f docker-entrypoint.sh ]; then rm docker-entrypoint.sh; fi
if [ -f Dockerfile ]; then rm Dockerfile; fi
wget https://github.com/nextcloud/docker/raw/master/${NEXTCLOUDVER}/apache/docker-entrypoint.sh https://github.com/nextcloud/docker/raw/master/${NEXTCLOUDVER}/apache/Dockerfile
chmod +x docker-entrypoint.sh
# Stop any running nextcloud instances (if any)
docker ps | grep nextcloud | tr -s ' ' | cut -f 2 -d ' ' | xargs -n 1 docker stop
# Remove the old instance before we rebuild it
docker rm nextcloud-${NEXTCLOUDVER}
docker build -t nextcloud-${NEXTCLOUDVER} . && \
docker run --name nextcloud-${NEXTCLOUDVER} \
--restart=always \
-d \
-p 1.2.3.4:8001:80 \
-v /data/nextcloud/data:/var/www/data \
-v /data/nextcloud/apps:/var/www/html/apps \
-v /data/nextcloud/config:/var/www/html/config \
nextcloud-${NEXTCLOUDVER}
# needed for LDAPS to work
cat myca.crt | docker exec -i nextcloud-${NEXTCLOUDVER} bash -c 'cat > /usr/local/share/ca-certificates/myca.crt; update-ca-certificates
# Might as well script this in - I use it often enough when debugging!
docker exec -it nextcloud-${NEXTCLOUDVER} bash -c "apt-get update && apt-get install -y sudo vim"