Perhaps I’m just searching for the entirely wrong things, but I can’t seem to figure out how to specify a directory for a volume in either Podman or Docker. The documentation hasn’t helped much, since I can’t find anything referencing to my problem.

I’m trying to mount a 2nd drive (/mnt/sdb/), but every solution leaves the mountpoint at the default location. (/home/user/.loca/share/containers/volumes/so-on-so-forth/)

Any help would be greatly appreciated.

  • uzay@infosec.pub
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    The podman docs describe it as follows

    If -v /HOST-DIR:/CONTAINER-DIR is specified, Podman bind mounts /HOST-DIR from the host into /CONTAINER-DIR in the Podman container. Similarly, -v SOURCE-VOLUME:/CONTAINER-DIR mounts the named volume from the host into the container. If no such named volume exists, Podman creates one. If no source is given, the volume is created as an anonymously named volume with a randomly generated name, and is removed when the container is removed via the --rm flag or the podman rm --volumes command.

    Is that what you’ve been doing?