Skip to main content

Nextcloud CLI (ooc) im Docker Container verwenden

https://www.reddit.com/r/NextCloud/comments/croxkm/how_to_use_occ_scan_on_a_docker_install/

https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/occ_command.html#using-the-occ-command

 

zuerst in den Docker container gehen (zb Portainer oder über Konsole) und folgendes Kommando testen:

php occ maintenance:mode --on

image.png 

image.png

 

evtl kommt folgende Fehlermeldung:

root@1dfd70a49980:/var/www/html# php occ maintenance:mode --on
Console has to be executed with the user that owns the file config/config.php
Current user id: 0
Owner id of config.php: 33
Try adding 'sudo -u #33' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 33' to the docker command (without the single quotes)

danach die Konsole des Containers nochmal starten, diesmal mit dem vorgeschlagenen Nutzer (user id 33 in meinem Fall, wie in der Ausgabe vorgeschlagen):

image.png

oder 

docker exec container_name sudo -u 33 php7 /var/www/html/occ files:scan --all

 

image.png