Bind mount
A bind mount makes an existing file or directory accessible at another filesystem location, commonly exposing host contents within a container.
Learn Docker in a Month of Lunches, Second Edition
A local bind mount makes a directory or file from the host filesystem available at a path in a container.
- How it is used
- Shares host directories or files with containers for data access, development, configuration, and selected network-storage workflows.
- How deep it goes
- Explains mounting, bidirectional access, read-only use, directory shadowing, file behavior, and storage limitations across operating systems.
- Examples
- Demonstrates host database persistence, local source-code loading, read-only configuration, and directory-versus-file mount behavior.
- What you can do after
- Operate/configure Docker containers with host-backed directories, verify mounted data, and choose read-only or writable access appropriately.
Read how Learn Docker in a Month of Lunches, Second Edition explains bind mount →
Building Distributed Applications that Work
A bind mount maps a location in the host filesystem to a location in a container filesystem.
- How it is used
- Makes host-managed realm JSON files available inside a Keycloak container during startup.
- How deep it goes
- Defines the mapping and shows its Aspire configuration, startup argument, and build-output requirement without exploring Docker internals.
- Examples
- Maps a local Keycloak folder to /opt/keycloak/data/import through an ImportRealms extension method.
- What you can do after
- Apply it via Aspire’s WithBindMount to supply realm files to Keycloak at startup.
Read how Building Distributed Applications that Work explains bind mount →
Related concepts
- file systemuses · A file system is a software-managed structure and interface for organizing, naming, storing, and accessing files and directories on storage.
- Docker Composeused by · Docker Compose is a tool for defining and running applications composed of multiple containers through declarative configuration.
- containeruses · A software container is an isolated execution environment that packages an application and its dependencies while sharing the host operating system kernel.
- Podmanused by · Podman is a daemonless, open-source container engine for building, running, and managing containers and container images.
- volumekind of · A volume is a logical storage resource that provides capacity for storing and accessing data, often by making it available to an operating system or application.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

