You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current documentation suggests mounting the Caddyfile as a file:
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
This approach can lead to issues due to how Docker handles file binds. When an individual file is mounted into a container, Docker mounts the inode of the file on the Linux filesystem. If the file is replaced (which many editors do), the inode changes. Thus it can happen that writes to the file after starting the container won't be reflected between the inside and outside of the container.
For more detailed information, refer to this Docker issue: moby/moby#6011
To avoid such issues, it is often suggested mount the parent directory instead of relying on single file bind mounts.
volumes:
- $PWD/etc:/etc/caddy
with the file tree
├── compose.yml
└── etc
└── Caddyfile
It would make sense update the documentation accordingly or at least incorporate a warning about this docker issue with file mounts.
The text was updated successfully, but these errors were encountered:
The current documentation suggests mounting the Caddyfile as a file:
This approach can lead to issues due to how Docker handles file binds. When an individual file is mounted into a container, Docker mounts the inode of the file on the Linux filesystem. If the file is replaced (which many editors do), the inode changes. Thus it can happen that writes to the file after starting the container won't be reflected between the inside and outside of the container.
For more detailed information, refer to this Docker issue: moby/moby#6011
To avoid such issues, it is often suggested mount the parent directory instead of relying on single file bind mounts.
with the file tree
It would make sense update the documentation accordingly or at least incorporate a warning about this docker issue with file mounts.
The text was updated successfully, but these errors were encountered: