feat: add volume-nocopy - #5129
Conversation
Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
|
+) I thought Adding |
Does it exist in Docker? |
yes https://github.com/docker/cli/blob/master/man/docker-run.1.md?plain=1#L744C1-L755C14 |
Then it should be implemented too |
|
Yeah I figured. I will follow up with another pr if that's ok |
There was a problem hiding this comment.
Pull request overview
Adds Docker-compatible volume-nocopy support for volume mounts.
Changes:
- Parses and propagates the new mount option.
- Skips initial image-content copying when enabled.
- Adds documentation and unit/integration coverage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pkg/mountutil/mountutil.go |
Stores the no-copy setting. |
pkg/mountutil/mountutil_linux.go |
Parses and validates the option. |
pkg/mountutil/mountutil_linux_test.go |
Tests basic parsing. |
pkg/cmd/container/run_mount.go |
Conditionally skips content copying. |
docs/command-reference.md |
Documents the option. |
cmd/nerdctl/container/container_run_mount_linux_test.go |
Tests no-copy behavior end to end. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| case "volume-nocopy": | ||
| volumeNoCopy = true | ||
| continue |
Part of Update the list of the unimplemented Docker features (and implement them) #3867
This patch parses
volume-nocopyoption and skip copying the contents from the image to the volume when specified.Added unit and integration tests