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

@vvoland self-assigned this

Feb 11, 2026

thaJeztah

thaJeztah

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

Feb 12, 2026
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>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

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

Mar 4, 2026

thaJeztah