never do this.
also never ever.
what you want to do:
first setup your docker container in this way that config.php is “outside” the container in a save place on your host. you do this by defining a volume -v <host-path>:/var/www/html
. that makes your changes to the nextcloud config persistent to docker image updates. also apps and themes are persistent to updates of the docker image. (btw: it’s important to understand the difference between images and container. google and youtube will help you. )
now you could edit <host-path>/config/config.php
.
occ is the comand line tool to administer nextcloud. in the docker world you run sudo docker exec --user www-data <nextcloud-docker-id> php occ <occ:command options>
e.g.: docker exec --user www-data nextcloud php occ overwrite.cli.url --value=https://cloud.fritz.box
https://docs.nextcloud.com/server/17/admin_manual/configuration_server/occ_command.html
some examples. note: you have to put docker exec --user www-data nextcloud php occ
in front of each line. remove '- " … " ’ around each line. {{ … }} are variables in this notation. i think you guess the real values to put in.
note that the value of “trusted domains” in the config.php is an array. you are sure you didn’t made a typo?