Bind mount
Maps a real host file or folder path directly into the container.
This page explains the practical difference between using your real machine folder and using Docker-managed persistent storage.
Maps a real host file or folder path directly into the container.
Uses storage managed by Docker itself, which is often cleaner for persistent application data.
Bind mounts fit local code development. Volumes fit persistent service data like databases and uploads.
docker run -v /Users/yash/project:/app my-imageThe container reads your local project folder directly.
docker run -v mydata:/app/data my-imageDocker manages mydata and keeps it separate from your host folder structure.
Next page: Lesson 14 explains multi-stage builds and why they help create smaller production-ready images.