文章 链接到标题 技术 链接到标题 为什么在容器外修改了文件后容器内的文件没有同步更新?——一次 Docker 文件挂载和 Bind mount 的探索
Bind Mount 特性:
If you are using some editor like vim, when you save the file it does not save the file directly, rather it creates a new file and copies it into place. This breaks the bind-mount, which is based on inode. Since saving the file effectively changes the inode, changes will not propagate into the container. When the container is restarted the new inode.