apple / apple/container

[Request]: Nested bind mounts (make a directory read-only within a mount, etc.)

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

Description

### Feature or enhancement request details

When two or more bind mounts are supplied and a target of the latter one is a subdirectory of the target of a prior one, the inner mount should be "overlaid." (Docker supports this "mount-over-mount" layering.)

For example, if within an entire directory structure you want to make a particular folder read-only so that it is not overwritten or mutated from inside a container:
```yml
- ./dir1:/dir1
- ./dir1/locked:/dir1/locked:ro
- ./dir2:/dir1/alternate
```

**Result:** `/dir1` is read-write, but `/dir1/locked` is read-only.

### Code of Conduct

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

Contributor guide

Open the contributing guide

Research direction

Use the nested bind-mount example in the issue as the starting acceptance case, focusing on a later mount whose target is inside an earlier mount. Done means the inner mount overlays the outer mount and preserves its read-only option, while the surrounding mount remains read-write; no files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, swift
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.