-
Notifications
You must be signed in to change notification settings - Fork 2.1k
container/opts: Add bind-create-mountpoint mount option #6792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Oh! I now recall I saw a PR from @ndeloof which I think is doing the same, but I had to think about the naming of the option (he picked
|
|
I think it should be |
|
Yeah, we probably didn't think it through properly when we named the API field 😞. For the CLI, UX doesn't have to strictly match the API naming of course. But yeah; ideally we'd rename the API field, but that may need some juggling to deprecate the old (so perhaps we'd need "both" for some time). |
|
Oh! Regardless of that; Nicolas's PR also has some documentation changes; if we continue on this PR, we should include those here (you can add him as co-authored-by). |
Add support for the `bind-create-mountpoint` option in bind mounts, which instructs the daemon to create the mountpoint directory inside the container if it doesn't exist. This allows to replace the legacy `-v /src/dir:/dst` with the `--mount`. Usage: --mount type=bind,src=/host/path,dst=/container/path,bind-create-mountpoint --mount type=bind,src=/host/path,dst=/container/path,bind-create-mountpoint=true Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Add support for the
bind-create-mountpointoption in bind mounts, which instructs the daemon to create the mountpoint directory inside the container if it doesn't exist.This allows to replace the legacy
-v /src/dir:/dstwith the--mount.Usage:
--mount type=bind,src=/host/path,dst=/container/path,bind-create-mountpoint
--mount type=bind,src=/host/path,dst=/container/path,bind-create-mountpoint=true
- What I did
- How I did it
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)