nextcloud / nextcloud/docker

Why is the main folder required to be on a volume, for updates?

Open
#340 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

data persistence image question
Dominant language
Shell
Stars
7.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I have an existing nextcloud installation, that I want to migrate to nextcloud:fpm docker container. To this end, I am considering the following docker run command, that allows me to reuse my existing mysql db and data folders:

docker run -d \
-v /nextcloud:/var/www/html \
-v /nextcloud/apps:/var/www/html/custom_apps \
-v /nextcloud/config:/var/www/html/config \
-v /nextcloud/data:/var/www/html/data \
--net="host" \
-e MYSQL_DATABASE=<mysql_db> \
-e MYSQL_USER=<mysql_user> \
-e MYSQL_PASSWORD=<mysql_pass> \
-e MYSQL_HOST=127.0.0.1 \
nextcloud:fpm

My question is: in the image readme is stated that mapping /var/www/html is required for updating, but I do not understand why: If the container will be thrown away when there is an update, and a new one will be pulled, I think I do not need that mapped volume... right?

Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the image README section that says /var/www/html must be mapped for updates, then compare it with the posted docker run command and its separate apps, config, and data mounts. Clarify the role of the main volume during container updates and update the README wording so the required persistence and migration behavior are unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mysql
Domain
devops, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.