--- title: "Use bind mounts" keywords: > get started, setup, orientation, quickstart, intro, concepts, containers, docker desktop description: Using bind mounts in our application --- In [part 5](./05_persisting_data.md), you used a volume mount to persist the data in your database. A volume mount is a great choice when you need somewhere persistent to store your application data. A bind mount is another type of mount, which lets you share a directory from the host's filesystem into the container. When working on an application, you can use a bind mount to mount source code into the container. The container sees the changes you make to the code immediately, as soon as you save a file. This means that you can run processes in the container that watch for filesystem changes and respond to them. In this chapter, you'll see how you can use bind mounts and a tool called [nodemon](https://npmjs.com/package/nodemon){:target="_blank" rel="noopener" class="_"} to watch for file changes, and then restart the application automatically. There are equivalent tools in most other languages and frameworks. ## Quick volume type comparisons The following table outlines the main differences between volume mounts and bind mounts. | | Named volumes | Bind mounts | | -------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- | | Host location | Docker chooses | You decide | | Mount example (using `--mount`) | `type=volume,src=my-volume,target=/usr/local/data` | `type=bind,src=/path/to/data,target=/usr/local/data` | | Populates new volume with container contents | Yes | No | | Supports Volume Drivers | Yes | No | ## Trying out bind mounts Before looking at how you can use bind mounts for developing your application, you can run a quick experiment to get a practical understanding of how bind mounts work. 1. Open a terminal and change directory to the `app` directory of the getting started repository. 2. Run the following command to start `bash` in an `ubuntu` container with a bind mount.