0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-07-25 16:28:05 +02:00

Compare commits

...

6 commits

Author SHA1 Message Date
Alexander "Ananace" Olofsson
28309c732c
Merge a11a594a04 into b8b4dd8984 2024-11-24 13:40:43 -05:00
Josh
b8b4dd8984
Merge pull request #2315 from tzerber/volume-clarification
Clarify Readme on bind volumes to avoid `apps` / `custom_apps` mishaps
2024-11-24 13:31:51 -05:00
Kaloyan Nikolov
a82394557c
Merge branch 'nextcloud:master' into volume-clarification 2024-11-12 23:29:49 +02:00
Kaloyan Nikolov
daea70d768 Replace bind mounts with figurative path
Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com>
2024-11-12 23:25:14 +02:00
Kaloyan Nikolov
0ee77f1a92
Clarify apps and custom_apps
Co-authored-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com>
2024-10-22 02:02:06 +03:00
Kaloyan Nikolov
53c3162c83 Clarify Readme on bind volumes
Signed-off-by: Kaloyan Nikolov <tzerber@gmail.com>
2024-10-17 22:17:18 +03:00

View file

@ -87,13 +87,38 @@ If you want to use named volumes for all of these, it would look like this:
```console
$ docker run -d \
-v nextcloud:/var/www/html \
-v apps:/var/www/html/custom_apps \
-v custom_apps:/var/www/html/custom_apps \
-v config:/var/www/html/config \
-v data:/var/www/html/data \
-v theme:/var/www/html/themes/<YOUR_CUSTOM_THEME> \
nextcloud
```
If you'd prefer to use bind mounts instead of named volumes, for instance, when working with different device or network mounts for user data files and configuration:
```console
$ docker run -d \
-v /path/on/host/to/folder/nextcloud:/var/www/html \
-v /path/on/host/to/folder/custom_apps:/var/www/html/custom_apps \
-v /path/on/host/to/folder/config:/var/www/html/config \
-v /path/on/host/to/folder/data:/var/www/html/data \
-v /path/on/host/to/folder/theme:/var/www/html/themes/<YOUR_CUSTOM_THEME> \
nextcloud
```
Heres the same example using Docker's more detailed `--mount`. Note that with `-v` or `--volume`, the specified folders are created automatically if they don't exist. However, when using `--mount` for bind mounts, the directories must already exist on the host, or Docker will return an error.
```console
$ docker run -d \
--mount type=bind,source=/path/on/host/to/folder/nextcloud,target=/var/www/html \
--mount type=bind,source=/path/on/host/to/folder/custom_apps,target=/var/www/html/custom_apps \
--mount type=bind,source=/path/on/host/to/folder/config,target=/var/www/html/config \
--mount type=bind,source=/path/on/host/to/folder/data,target=/var/www/html/data \
--mount type=bind,source=/path/on/host/to/folder/theme,target=/var/www/html/themes/<YOUR_CUSTOM_THEME> \
nextcloud
```
The examples above use figurative directory `/path/on/host/to/folder/` for bind mounts. Please modify the paths by using either a relative or absolute path.
NOTE: Do not confuse the `apps` and `custom_apps` folders. These folders contain different sets of apps, and mixing them will result in a broken installation. The former contains "shipped" apps, which come with Nextcloud Server. The latter contains apps you install from the App Store.
### Custom volumes
If mounting additional volumes under `/var/www/html`, you should consider: