mirror of
https://github.com/portainer/portainer-docs.git
synced 2026-03-27 04:48:31 +07:00
GITBOOK-38: FAQ - empty bind mounts
This commit is contained in:
committed by
gitbook-bot
parent
afa2698c5a
commit
0b2aac4125
BIN
.gitbook/assets/Relative-bind-mounts-FAQ-1.png
Normal file
BIN
.gitbook/assets/Relative-bind-mounts-FAQ-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
.gitbook/assets/Relative-bind-mounts-FAQ.png
Normal file
BIN
.gitbook/assets/Relative-bind-mounts-FAQ.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
@@ -376,6 +376,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/why-do-relative-bind-mounts-appear-empty-after-updating-a-stack-that-was-deployed-from-git.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)
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user