Upgrade from 6.3 docker to latest failed: missing python 2.7 interpreter

Hi,

I have a Seafile 6.3 installation running from the official seafileltd/seafile:latest docker, and am trying to upgrade it to the current multi-container image. I followed the instructions from seafile-manual/docker/6.3%20upgrade%20to%207.0.md but got the following error at the end while running docker-compose:

seafile |
seafile | ------------------------------
seafile | Fix ccnet conf success
seafile | ------------------------------
seafile |
seafile | [09/14/2020 18:30:36][upgrade]: Running script /opt/seafile/seafile-server-7.1.4/upgrade/upgrade_6.3_7.0.sh
seafile |
seafile | -------------------------------------------------------------
seafile | This script would upgrade your seafile server from 6.3 to 7.0
seafile | Press [ENTER] to contiune
seafile | -------------------------------------------------------------
seafile |
seafile |
seafile | Can’t find a python executable of version 2.7 or above in PATH
seafile | Install python 2.7+ before continue.
seafile | Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it
seafile |
seafile | [2020-09-14 18:30:36] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
seafile | [2020-09-14 18:30:36] Running scripts /opt/seafile/seafile-server-7.1.4/upgrade/upgrade_6.3_7.0.sh
seafile | Traceback (most recent call last):
seafile | File “/scripts/start.py”, line 86, in
seafile | main()
seafile | File “/scripts/start.py”, line 58, in main
seafile | check_upgrade()
seafile | File “/scripts/upgrade.py”, line 182, in check_upgrade
seafile | run_script_and_update_version_stamp(script, new_version)
seafile | File “/scripts/upgrade.py”, line 61, in run_script_and_update_version_stamp
seafile | call(script)
seafile | File “/scripts/utils/init.py”, line 70, in call
seafile | return subprocess.check_call(*a, **kw)
seafile | File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
seafile | raise CalledProcessError(retcode, cmd)
seafile | subprocess.CalledProcessError: Command ‘/opt/seafile/seafile-server-7.1.4/upgrade/upgrade_6.3_7.0.sh’ returned non-zero exit status 1.
seafile | *** /scripts/start.py exited with status 1.
seafile | *** Shutting down runit daemon (PID 22)…
seafile | *** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown…
seafile | *** Killing all processes…
seafile exited with code 1

It looks like the 2.7 python interpreter is missing from the seafileltd/seafile-mc:latest docker image, and this prevents the upgrade script to run. How should I proceed ?

Regards,
David

In case someone encounter the same problem, here is the workaround I ended up with.
I built a custom seafile-mc docker image with the following Dockerfile:

FROM seafileltd/seafile-mc:latest
RUN apt update && apt upgrade -y && apt install -y python python-configparser

I then changed the docker-compose.yml to use the resulting image instead of the official one .
Following the instructions at seafile-manual/docker/6.3%20upgrade%20to%207.0.md then worked as intended.

If somebody has a better solution, I’m all ears !

Regards,
David

Thanks a lot,
works fine for me too.

Sorry to necro an old thread, but just wanted to throw in that this workaround worked for me. Once the upgrade is complete, you can change your docker-compose.yml to point back to the official image.