Skip to content

engine: add bind-create-src mount option#24140

Draft
dvdksn wants to merge 1 commit intodocker:mainfrom
dvdksn:bind-create-src
Draft

engine: add bind-create-src mount option#24140
dvdksn wants to merge 1 commit intodocker:mainfrom
dvdksn:bind-create-src

Conversation

@dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Feb 13, 2026

Description

Adds a new option for --mount type=bind

Related issues or tickets

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Feb 13, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 4e672e6
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/698eec0607dd830008efe148
😎 Deploy Preview https://deploy-preview-24140--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dvdksn dvdksn marked this pull request as draft February 13, 2026 09:17
@github-actions github-actions bot added area/engine Issue affects Docker engine/daemon area/get-started Relates to get started and onboarding docs area/storage Relates to storage, volumes labels Feb 13, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation Review Summary

Found 2 medium-severity issues in the new content documenting the bind-create-src option:

  1. Terminology inconsistency: Using "source directory" vs "source path" inconsistently
  2. Misleading example: Using /dev/mydir which 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine Issue affects Docker engine/daemon area/get-started Relates to get started and onboarding docs area/storage Relates to storage, volumes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant