• Without more information, I’d say you’re looking for podman run --volume /mnt/sdb/:/path/inside/your/container. Check the manpage for podman run

  • 3 years

    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?

  • Using podman-compose, I usually have a section like:

    volumes:
        - ./local_folder:/container/folder
    

    Specifically, I have to use either an absolute path or a relative path with “./” to prevent it from treating a directory as a volume name.