It might be interesting, but in such a case it would be best to create an app.
what happens if someone does not have docker? Or if they use nginx? And they have perhaps a apache and nginx setup on their system? So this could only work when called from within Nextcloud (through webserver).
this is the command line interface configuration. Very unexperienced users (especially on webhosting) might have different php versions available, and the version used by the web server can be different.
I’m not sure if the NextcloudPi and/or AIO already have some functions to print out environment details.