`/etc/todos/todo.db` in the container's filesystem. If you're not familiar with SQLite, no worries! It's simply a relational database that stores all the data in a single file. While this isn't the best for large-scale applications,
it works for small demos. You'll learn how to switch this to a different database engine later.
With the database being a single file, if you can persist that file on the host and make it available to the
next container, it should be able to pick up where the last one left off. By creating a volume and attaching
(often called "mounting") it to the directory where you stored the data, you can persist the data. As your container
writes to the `todo.db` file, it will persist the data to the host in the volume.
As mentioned, you're going to use a volume mount. Think of a volume mount as an opaque bucket of data.
Docker fully manages the volume, including the storage location on disk. You only need to remember the
name of the volume.
### Create a volume and start the container
You can create the volume and start the container using the CLI or Docker Desktop's graphical interface.
{{< tabs >}}
{{< tab name="CLI" >}}
1. Create a volume by using the `docker volume create` command.
```console
$ docker volume create todo-db
```
2. Stop and remove the todo app container once again with `docker rm -f <id>`,
as it is still running without using the persistent volume.
3. Start the todo app container, but add the `--mount` option to specify a
volume mount. Give the volume a name, and mount it to `/etc/todos` in the
container, which captures all files created at the path.
```console
$ docker run -dp 127.0.0.1:3000:3000 --mount type=volume,src=todo-db,target=/etc/todos getting-started
```
> [!NOTE]
>
> If you're using Git Bash, you must use different syntax for this command.
>
> ```console
> $ docker run -dp 127.0.0.1:3000:3000 --mount type=volume,src=todo-db,target=//etc/todos getting-started
> ```
>
> For more details about Git Bash's syntax differences, see
> [Working with Git Bash](/desktop/troubleshoot-and-support/troubleshoot/topics/#docker-commands-failing-in-git-bash).
{{< /tab >}}
{{< tab name="Docker Desktop" >}}
To create a volume:
1. Select **Volumes** in Docker Desktop.
2. In **Volumes**, select **Create**.
3. Specify `todo-db` as the volume name, and then select **Create**.
To stop and remove the app container:
1. Select **Containers** in Docker Desktop.
2. Select **Delete** in the **Actions** column for the container.
To start the todo app container with the volume mounted:
1. Select the search box at the top of Docker Desktop.
2. In the search window, select the **Images** tab.
3. In the search box, specify the image name, `getting-started`.
> [!TIP]
>
> Use the search filter to filter images and only show **Local images**.
4. Select your image and then select **Run**.
5. Select **Optional settings**.
6. In **Host port**, specify the port, for example, `3000`.
7. In **Host path**, specify the name of the volume, `todo-db`.
8. In **Container path**, specify `/etc/todos`.
9. Select **Run**.
{{< /tab >}}
{{< /tabs >}}
### Verify that the data persists
1. Once the container starts up, open the app and add a few items to your todo list.