Skip to content

[Request]: Support bind mounting the same directory multiple times in the container #380

@justinyaodu

Description

@justinyaodu

Feature or enhancement request details

If I mount one directory into a container, it works fine:

container run -it --rm --mount type=bind,src=$HOME,dst=/home-ro,ro debian:unstable bash

But if I try to mount the same directory twice, it fails:

container run -it --rm --mount type=bind,src=$HOME,dst=/home-rw --mount type=bind,src=$HOME,dst=/home-ro,ro debian:unstable bash
Error: unknown: "Error Domain=VZErrorDomain Code=2 "More than one Virtio File System device uses the tag “04131abe9006686b4bfe17357444d13e2622”." UserInfo={NSLocalizedFailure=Invalid virtual machine configuration., NSLocalizedFailureReason=More than one Virtio File System device uses the tag “04131abe9006686b4bfe17357444d13e2622”.}"

Admittedly, I don't have a compelling need for this, but the limitation feels a bit arbitrary and didn't see any mention of it elsewhere. I figured I could post an issue in case it's a simple fix. Thanks!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    storageissues and features associated with storage.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions