container/opts: Add bind-create-src mount option by vvoland · Pull Request #6792 · docker/cli (original) (raw)

@vvoland self-assigned this

Feb 11, 2026

thaJeztah

thaJeztah

@vvoland vvoland changed the titlecontainer/opts: Add bind-create-mountpoint mount option container/opts: Add bind-create-host-path mount option

Feb 12, 2026

@vvoland

Add support for the bind-create-src option in bind mounts, which instructs the daemon to create the source mountpoint on the host 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-src --mount type=bind,src=/host/path,dst=/container/path,bind-create-src=true

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

@ndeloof @vvoland

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

@vvoland vvoland changed the titlecontainer/opts: Add bind-create-host-path mount option container/opts: Add bind-create-src mount option

Mar 4, 2026

thaJeztah

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})