Moodle 3.9+ installation: Simple solution for PHP>=7.1 dependency?

I followed the Cool Solutions “Install Moodle” instructions to prepare, download and install the Moodle LMS. Since Moodle 3.6 seems to be outdated (there is an actual legacy release on the official moodle download site, but: “We highly recommend you upgrade!”) it has been a simple idea to change the download URL to

https://download.moodle.org/download.php/direct/stable39/moodle-latest-39.tgz

and everything worked fine but to the point where the moodle webservice is called the first time:

https://<server>/moodle

only shows the following message:

Moodle 3.7 or later requires at least PHP 7.1.0 (currently using version 7.0.33-0+deb9u8). Some servers may have multiple PHP versions installed, are you using the correct executable?

I don’t think it would be a good idea to upgrade UCS’s PHP version and the quote says there is the possibility to have multiple PHP versions installed. It would be nice to know if this is a suitable way for solving this problem. There may be another solution installing moodle and a newer PHP version as a docker image.
Possibly there is another very simple solution because in Cool Solution - Install Moodle / LDAP enrollments is Tested with moodle 3.9+ but refers to the moodle-3.6-based Cool Solutions - Install Moodle?

You could try running it in docker. I imagine there are quite a few images out there already you could experiment with.

Mastodon