Skip to content
Opsfolk

Storage and networking, topic 15 of 41

Bind mounts

A bind mount puts a file or directory of the host inside the container, as it is. It is how you edit code on your machine and see the change in a running container, and how you hand a container one config file.

It ties the container to the host's paths and permissions: files are owned by the host's user IDs, and a container that runs as root can change them. Use volumes for data, bind mounts for what you edit, and :ro when the container only reads.

On Opsfolk

Nothing of ours for this topic yet: an article is on its way.

Elsewhere

Your progress