Skip to content

Commit 65ec000

Browse files
ndeloofvvoland
authored andcommitted
docs/service: Document bind-create-mountpoint
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1 parent 979a02b commit 65ec000

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/reference/commandline/service_create.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,22 @@ The following options can only be used for bind mounts (`type=bind`):
457457
When the option is not specified, the default behavior corresponds to setting <tt>enabled</tt>.
458458
</td>
459459
</tr>
460+
<tr>
461+
<td><b>bind-create-mountpoint</b></td>
462+
<td>
463+
By default, bind mounts require the source path to exist on the host. This is a significant difference
464+
from the <tt>-v</tt> flag, which creates the source path if it doesn't exist.<br />
465+
<br />
466+
Set <tt>bind-create-mountpoint</tt> to create the source path on the host if it doesn't exist.<br />
467+
<br />
468+
A value is optional:<br />
469+
<br />
470+
<ul>
471+
<li><tt>true</tt> or <tt>1</tt>: Create path on host if it doesn't exist.</li>
472+
<li><tt>false</tt> or <tt>0</tt>: Default behavior. If source path doesn't exist, an error will be reported.</li>
473+
</ul>
474+
</td>
475+
</tr>
460476
</table>
461477

462478
##### Bind propagation

0 commit comments

Comments
 (0)