Mountpoint shown does not exist on my computer

There is a similiar question already asked in 2020 but not answered yet. So I try asking it again - hopefully with more success :wink:

I am about to get started with docker. I run it on an ubuntu-linux and am working with the getting-started guide.
As mentioned in the persisting topic, the “docker volume inspect” command will show me the real location wth the tag “Mountpoint”.
I’m shown this result:

ulrich@Ubuntu-Services:~$ docker volume inspect todo-db
[
    {
        "CreatedAt": "2023-06-14T05:41:07Z",
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/var/lib/docker/volumes/todo-db/_data",
        "Name": "todo-db",
        "Options": null,
        "Scope": "local"
    }
]

But unfortunately, the path mentioned as mountpoint does not exist. Even /var/lib/docker is missing. I think it is somewhere relative to my homedir (“~/…/”/var/lib/docker/volumes/todo-db/_data) but could not find it.

This is true for every Docker Desktop version, as it always runs the Docker Engine in a utility vm. In this case the path would be inside the utility vm and not on the host. It is not meant to be accessed, so please don’t ask how one would still access the folder: I don’t know, and I don’t feel the need to find out (reason: see last sentence)

docker-ce on the other hand runs directly on the host. A volume named todo-db will store its data in the returned path on the host file system. You can easily test with the command sudo stat /var/lib/docker/volumes/todo-db/_data.

Though, it is not recommended to tinker with the folder or files inside in any way, it is meant to be a docker manged path in the filesystem, where docker takes care of setting the right permissions.

1 Like