Skip to content

Fix bind-mounted app directories being overridden by anonymous volumes#444

Open
pulsarf0x wants to merge 1 commit into
nextcloud:masterfrom
pulsarf0x:master
Open

Fix bind-mounted app directories being overridden by anonymous volumes#444
pulsarf0x wants to merge 1 commit into
nextcloud:masterfrom
pulsarf0x:master

Conversation

@pulsarf0x
Copy link
Copy Markdown

@pulsarf0x pulsarf0x commented Jan 9, 2026

Hello Team,

Here's a little PR that could make DX better :

Problem

When using nextcloud-docker-dev for local development, apps installed via
occ app:install or the App Store were not appearing on the host filesystem.

Although bind-mounts for app directories were defined, they were overridden
by anonymous Docker volumes declared later in the service configuration.
As a result, Nextcloud was writing apps into anonymous volumes instead of
the intended local directories, making them invisible to IDEs.

Root cause

Docker gives precedence to the last volume mounted on a given path.
Anonymous volumes declared for:

  • /var/www/html/apps-writable

were overriding explicit bind-mounts for development.

Solution

This PR removes the anonymous volumes that shadow bind-mounted directories.
With this change:

  • Apps installed via App Store or occ are written to the bind-mounted
    apps-writable directory
  • Installed apps are immediately visible on the host filesystem
  • The development workflow works as expected without manual workarounds

Impact

  • No impact on production usage (dev-only setup)
  • Improves developer experience and avoids confusing behavior
  • Aligns container filesystem behavior with expectations when using bind-mounts

@juliusknorr
Copy link
Copy Markdown
Member

Thanks for you PR, to me this is intended behaviour as this writable app directory was for me only used for testing app installation through the apps management but not for development. Is there any reason why you would not just clone the app you need in your local setup?

@pulsarf0x
Copy link
Copy Markdown
Author

Hello @juliusknorr,
Thanks for the feedback!

I agree that for pure development work, cloning an app directly into apps/ or apps-extra is often the right approach.

However, in practice, apps-writable is not only used for “testing installation” but is the default target for apps installed via the App Store or occ app:install, which is a very common workflow when:

  • debugging issues on a specific released app version
  • reproducing bugs reported from production
  • inspecting or patching a marketplace-installed app
  • working with private or enterprise apps that cannot simply be cloned from a public repository
    In these cases, cloning the app is not equivalent, as it may not match the exact version, dependencies, or packaging installed by Nextcloud.

Mounting apps-writable does not change the default behaviour or force developers to use it for development, but it makes installed apps visible on the host filesystem, which greatly improves debugging and inspection of apps without impacting users who prefer cloning apps manually.

What do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants