Files:Scan inside Docker


I tried to start
sudo -u www-data php occ files:scan
inside the official Docker Container. Unfortunately sudo is not installed and when using
su www-data php occ files:scan
I get a message, that the account is currently not available.

Any other Idea, starting the files:scan?



two things you can do:

  1. Install sudo in the docker container (ask the container provider to install it by default?)
  2. Enable the www-data account (hint: /etc/passwd and /usr/sbin/nologin)

where Nr. 1 should be preferred.


Thank you, I tried both. Unfortunately the owncloud-docker container is so limited, that I can't install sudo nor can edit the mentioned files. But I found another solution.


I fortunately can answer my question myself:
On your docker-host, you can run the docker command

docker exec -it -u www-data bash

With this, you are logged in as www-data and directly can start the file-scan:

php occ files:scan --all