engine: add bind-create-src mount option#24140
Conversation
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Documentation Review Summary
Found 2 medium-severity issues in the new content documenting the bind-create-src option:
- Terminology inconsistency: Using "source directory" vs "source path" inconsistently
- Misleading example: Using
/dev/mydirwhich suggests creating directories in a system-reserved path
Both issues are in the newly added content and should be addressed for clarity and accuracy.
| ``` | ||
|
|
||
| You can use the `bind-create-src` option to automatically create the source directory | ||
| on the host if it doesn't exist: |
There was a problem hiding this comment.
Terminology inconsistency between "source directory" and "source path"
The text here uses "source directory" but the error message directly above uses "bind source path does not exist" and the table below uses "source path" in "the source path doesn't exist on the daemon".
For terminology consistency per STYLE.md, this should use "source path" to match error messages and table descriptions. This helps users since they'll encounter "source path" in error messages.
Suggestion: Change "automatically create the source directory" to "automatically create the source path"
| on the host if it doesn't exist: | ||
|
|
||
| ```console | ||
| $ docker run --mount type=bind,src=/dev/mydir,dst=/mnt/foo,bind-create-src alpine |
There was a problem hiding this comment.
Misleading example using /dev directory
The example uses /dev/mydir as the source path. The /dev directory is a special system directory reserved for device files, and users should never create regular directories there.
Per STYLE.md code example guidance ("Use realistic text"), this example should use a realistic user directory that users might actually create and bind-mount.
Suggestion: Change /dev/mydir to something like /home/user/mydir or /tmp/mydir
Note: The /dev/noexist example above is fine since it's demonstrating an error condition, not showing what users should do.
Description
Adds a new option for
--mount type=bindRelated issues or tickets