apple / apple/container

[Request]: Storage - Allow mounting named volumes read-only to multiple containers

Open
#889 3 comments 4 reactions 0 assignees View on GitHub
storage
Dominant language
Swift
Stars
49.9k
Forks
1.8k
Avg merge
1d 20h
Merged PRs (30d)
22

Description

### Feature or enhancement request details

Add support for mounting a single named volume in read-only mode across multiple containers simultaneously. This would allow safe sharing of common datasets, ML models, or configuration files without duplication, ensuring consistency and reducing disk usage.

Example usage:
```
container run -v mydata:/data:ro container1
container run -v mydata:/data:ro container2
```

Things to consider:
* Allow multiple concurrent read-only mounts of the same named volume.
* Maintain exclusive access rules for read-write mounts to prevent conflicts.
* Ensure volume lifecycle and reference counting are updated to handle shared mounts.

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.