A bind mount makes a directory on the host available at a path inside a container. The container sees an ordinary directory, while files can be accessed from both environments. section 6.3
Use bind mounts when host-controlled files need to participate in container workflows:
- Share application data with a host filesystem, including local disks, RAID arrays, or accessible network storage. section 6.3
- Load local source code into a container so edits appear immediately without rebuilding the image. section 6.5
- Load configuration files as read-only mounts when the container should consume but not modify host data. section 6.3 section 6.5
Mount a host database directory
Create a local databases directory, mount it at /data, start the to-do application, call it with curl, and list the host directory. The generated database files appear on the host. Use Windows-style source and target paths for Windows Server containers. section 6.3
A directory mount replaces the target directory’s image contents rather than merging with them. Single-file mounts merge with an existing target directory on Linux, but Windows Server containers do not support that behavior. Network-backed storage may also lack local-disk performance or full filesystem features. section 6.4 section 6.5

