liveBook · Manning

Bind mount

A bind mount makes an existing file or directory accessible at another filesystem location, commonly exposing host contents within a container.

How 2 Manning books explain it

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

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.