GITBOOK-65: Relative bind mounts FAQ

This commit is contained in:
Hannah Cooper
2026-02-02 22:04:52 +00:00
committed by gitbook-bot
parent 806f50e800
commit d1a5400dc4
4 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -360,6 +360,7 @@
* [Troubleshooting Edge Agent Connection Issues](faqs/troubleshooting/agents-and-environment-management/troubleshooting-edge-agent-connection-issues.md)
* [How do I change the way I connect to an environment without losing my existing stacks?](faqs/troubleshooting/agents-and-environment-management/how-do-i-change-the-way-i-connect-to-an-environment-without-losing-my-existing-stacks.md)
* [Stacks, deployments and updates](faqs/troubleshooting/stacks-deployments-and-updates/README.md)
* [Why do relative bind mounts appear empty after updating a stack that was deployed from Git?](faqs/troubleshooting/stacks-deployments-and-updates/empty-relative-bind-mounts.md)
* [How do automatic updates for stacks/applications work?](faqs/troubleshooting/stacks-deployments-and-updates/how-do-automatic-updates-for-stacks-applications-work.md)
* [How does the image update notification icon work?](faqs/troubleshooting/stacks-deployments-and-updates/how-does-the-image-update-notification-icon-work.md)
* [Can I build an image while deploying a stack/application from Git?](faqs/troubleshooting/stacks-deployments-and-updates/can-i-build-an-image-while-deploying-a-stack-application-from-git.md)

View File

@@ -0,0 +1,9 @@
# Why do relative bind mounts appear empty after updating a stack that was deployed from Git?
When a stack deployed from a Git repository is updated, Portainer re-clones the repository if the commit has changed. This removes and recreates the repository directory on the host. If a container uses a relative path bind mount that points to files or directories inside the Git repository and that container is not recreated during the update, the bind mount can appear empty inside the container. This happens because the container is still referencing the previous filesystem path, which no longer exists after the repository is re-cloned.
Containers are only recreated when their Compose file or related configuration changes, unless [GitOps Updates with Force redeployment](../../../user/docker/stacks/add.md#option-3-git-repository) is enabled.
To ensure bind mounts are remounted correctly, [update the stack](../../../user/docker/stacks/edit.md) using **Pull and redeploy** with **Re-pull image and redeploy** enabled. This forces all containers in the stack to be recreated and remounts bind mounts against the newly cloned repository.
<div><figure><img src="../../../.gitbook/assets/Relative-bind-mounts-FAQ.png" alt=""><figcaption></figcaption></figure> <figure><img src="../../../.gitbook/assets/Relative-bind-mounts-FAQ-1.png" alt=""><figcaption></figcaption></figure></div>