Home Explore Blog CI



docker

3rd chunk of `content/get-started/workshop/05_persisting_data.md`
8c4c34a7ead239d6865b2c6780c320f7892eaaa9eea2a74a00000001000005eb

    

2. Stop and remove the container for the todo app. Use Docker Desktop or `docker ps` to get the ID and then `docker rm -f <id>` to remove it.

3. Start a new container using the previous steps.

4. Open the app. You should see your items still in your list.

5. Go ahead and remove the container when you're done checking out your list.

You've now learned how to persist data.

## Dive into the volume

A lot of people frequently ask "Where is Docker storing my data when I use a volume?" If you want to know, 
you can use the `docker volume inspect` command.

```console
$ docker volume inspect todo-db
```
You should see output like the following:
```console
[
    {
        "CreatedAt": "2019-09-26T02:18:36Z",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/todo-db/_data",
        "Name": "todo-db",
        "Options": {},
        "Scope": "local"
    }
]
```

The `Mountpoint` is the actual location of the data on the disk. Note that on most machines, you will
need to have root access to access this directory from the host.

## Summary

In this section, you learned how to persist container data.

Related information:

 - [docker CLI reference](/reference/cli/docker/)
 - [Volumes](/manuals/engine/storage/volumes.md)

## Next steps

Next, you'll learn how you can develop your app more efficiently using bind mounts.

{{< button text="Use bind mounts" url="06_bind_mounts.md" >}}

Title: Verifying Data Persistence and Diving into Volumes
Summary
This section explains how to verify data persistence by stopping, removing, and restarting the todo app container. After adding items to the todo list, restarting the container should show that the items are still present. It also covers how to inspect the Docker volume to find the actual location of the data on the disk using the `docker volume inspect` command. Finally, it summarizes what was learned about persisting container data and introduces the next step: using bind mounts for more efficient app development.