Putting docker volumes in the right place with CLI

Afternoon! I’m trying to learn how best to use the docker CLI on TrueNAS.

I have a few locally-built images I intend to run, and I’m much more familiar with the docker command, hence trying to learn things without the GUI.

To test things:

sudo docker run --name sandbox -d -it -v store-me:/storage ubuntu bash

However, I notice the volume does not get placed in my ZFS pool:

$ sudo docker volume inspect store-me
[
    {
        "CreatedAt": "2025-05-12T14:38:03-05:00",
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/mnt/.ix-apps/docker/volumes/store-me/_data",
        "Name": "store-me",
        "Options": null,
        "Scope": "local"
    }
]

I can see from df -h that /mnt/.ix-apps is in the boot pool, which is no good, and I’m also assuming I shouldn’t be putting end-user state in /mnt/.ix-apps.

What I plan to do instead:

  1. Clean up the above with docker volume rm
  2. Create a dataset docker and a few datasets below it
  3. Mount those in with -v /mnt/pool-name/docker/app-name:/storage

I just wanted to check that there isn’t anything more custom that interferes with that kind of usage? Is there some other special setup I should use?

Could you provide the output leading you to this conclusion along with the output of zfs list -d 1 | grep ix-apps?
Seems unusual that it’s on the boot-pool, unless the dataset was never created, did you set the pool in Apps -> Configuration -> Choose Pool?

Damn, sorry, I misread. I saw this:

boot-pool/ROOT/25.04.0/mnt       /mnt

But missed that further down:

Primary/ix-apps                  /mnt/.ix-apps
Primary/ix-apps/app_mounts       /mnt/.ix-apps/app_mounts
Primary/ix-apps/truenas_catalog  /mnt/.ix-apps/truenas_catalog
Primary/ix-apps/app_configs      /mnt/.ix-apps/app_configs
Primary/ix-apps/docker           /mnt/.ix-apps/docker

So it probably is fine to just use volumes out of the box then. My mistake - there are just a lot of entries in there.

I think I may use the -v /mnt/pool-name/docker/app-name:/storage in some places as long as that’s fine, just so that it’s easier for me to visualize.

did you set the pool in Apps -> Configuration -> Choose Pool?

Yes, and I can see now it’s using that as configured. :+1: