Bind Mounts
LEVEL 0
The Problem
Docker volumes work great for production, but during development you have a different workflow:
You’re writing code on your laptop. You change a file and want to see the result immediately in the running container. You don’t want to rebuild the image every time you make a change.
Or you have existing data on your host filesystem (configuration files, datasets, logs) that you want containers to access directly.
Docker volumes are managed by Docker and stored in /var/lib/docker/volumes/—not convenient to access from your normal development tools.
You need a way to mount a directory from your host filesystem directly into a container.