Iâm trying to run Nextcloud on my Raspberry Pi 4 using the official Docker image, which is Nexcloud 24.0.3.2, currently.
I am able to pull the image using the command âdocker pull nextcloudâ, and have verified that the image appears in the list of docker images from âdocker image lsâ
But when I attempt to actually start a container from the image, I get an error saying âtouch: setting times of â/var/www/html/nextcloud-init-sync.lockâ: Operation not permittedâ
I get this same error message regardless of whether I try the nextcloud:latest or nextcloud:apache images(the nextcloud:none image is a previous version that has been partially deleted improperly, I think).
I donât have a very thorough understanding of Docker, but the nextcloud imageâs Github readme says that /var/www/html is an âunnamed Docker volumeâ used for data storage.
Do I need to give myself write permissions for this Docker volume, so I can touch it? How would I even set permissions for stuff inside a Docker volume?
There is a workaround, by giving extended privileges to the nextcloud container:
I did another investigation and deleted the lock file many times. After some time I found out that if I run the nextcloud container as priviliged, the error touch: setting times of â/var/www/html/nextcloud-init-sync.lockâ: Operation not permitted does not happen again and I could upgrade to 23.0.4.
The --privileged flag gives all capabilities to the container. When the operator executes docker run --privileged, Docker will enable access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host. Additional information about running with --privileged is available on the Docker Blog.