When I tried to use this this image, mounted /var/www/html with a directory previously used for nextcloud, I ended up realizing the image deleted everything in that directory. I felt lucky that I used a separate data directory for my original nextcloud files.
This happens to be done at entrypoint.sh:98
This could be a problem when someone just wanted to dockerize their server and/or moving services around systems.
mkdir nextcloud_data
touch nextcloud_data/foo
docker run --rm -itv $PWD/nextcloud_data:/var/www/html nextcloud
[wait until it says "Initializing finished"]
^C
[nextcloud_data/foo is removed]
Maybe moving the original file to a backup directory is better.
@myzhang1029 I think this is the expected behaviour. This folder is updated, but you have an exclusion list that prevent data directory inside /var/www/html to be modified. The fact that your foo file get deleted seems normal to me.
@doc75 Thanks for your reply. Yes, you're right. After reading the code I found /upgrade.exclude which did that job.
However, as this is the _official_ image, I guess there will be other silly people like me who ran into the same issue.
So I'll try to note that in the documentation.
Most helpful comment
@doc75 Thanks for your reply. Yes, you're right. After reading the code I found
/upgrade.excludewhich did that job.However, as this is the _official_ image, I guess there will be other silly people like me who ran into the same issue.
So I'll try to note that in the documentation.