@@ -394,7 +394,7 @@ volumes in a service:
394394 <td>
395395 <p>The Engine mounts binds and volumes <tt>read-write</tt> unless <tt>readonly</tt> option
396396 is given when mounting the bind or volume. Note that setting <tt>readonly</tt> for a
397- bind-mount does not make its submounts <tt>readonly</tt> on the current Linux implementation . See also <tt>bind-nonrecursive </tt>.</p>
397+ bind-mount may not make its submounts <tt>readonly</tt> depending on the kernel version . See also <tt>bind-recursive </tt>.</p>
398398 <ul>
399399 <li><tt>true</tt> or <tt>1</tt> or no value: Mounts the bind or volume read-only.</li>
400400 <li><tt>false</tt> or <tt>0</tt>: Mounts the bind or volume read-write.</li>
@@ -432,17 +432,40 @@ The following options can only be used for bind mounts (`type=bind`):
432432 </td>
433433 </tr >
434434 <tr >
435- <td><b>bind-nonrecursive </b></td>
435+ <td><b>bind-recursive </b></td>
436436 <td>
437437 By default, submounts are recursively bind-mounted as well. However, this behavior can be confusing when a
438- bind mount is configured with <tt>readonly</tt> option, because submounts are not mounted as read-only.
439- Set <tt>bind-nonrecursive</tt> to disable recursive bind-mount.<br />
438+ bind mount is configured with <tt>readonly</tt> option, because submounts may not be mounted as read-only,
439+ depending on the kernel version.
440+ Set <tt>bind-recursive</tt> to control the behavior of the recursive bind-mount.<br />
441+ <br />
442+ A value is one of:<br />
443+ <br />
444+ <ul>
445+ <li><<tt>enabled</tt>, <tt>true</tt> or <tt>1</tt>: Enables recursive bind-mount.
446+ Read-only mounts are made recursively read-only if kernel is v5.12 or later.
447+ Otherwise they are not made recursively read-only.</li>
448+ <li><<tt>disabled</tt>, <tt>false</tt> or <tt>0</tt>: Disables recursive bind-mount.</li>
449+ <li><<tt>writable</tt>: Enables recursive bind-mount.
450+ Read-only mounts are not made recursively read-only.</li>
451+ <li><<tt>readonly</tt>: Enables recursive bind-mount.
452+ Read-only mounts are made recursively read-only if kernel is v5.12 or later.
453+ Otherwise the Engine raises an error.</li>
454+ </ul>
455+ When the option is not specified, the default behavior correponds to setting <tt>enabled</tt>.
456+ </td>
457+ </tr >
458+ <tr >
459+ <td><b>bind-nonrecursive</b></td>
460+ <td>
461+ <tt>bind-nonrecursive</tt> is deprecated since Docker Engine v25.0.
462+ Use <tt>bind-recursive</tt>instead.<br />
440463 <br />
441464 A value is optional:<br />
442465 <br />
443466 <ul>
444- <li><tt>true</tt> or <tt>1</tt>: Disables recursive bind-mount .</li>
445- <li><tt>false</tt> or <tt>0</tt>: Default if you do not provide a value. Enables recursive bind-mount .</li>
467+ <li><tt>true</tt> or <tt>1</tt>: Equivalent to <tt> bind-recursive=disabled</tt> .</li>
468+ <li><tt>false</tt> or <tt>0</tt>: Equivalent to <tt> bind-recursive=enabled</tt> .</li>
446469 </ul>
447470 </td>
448471 </tr >
0 commit comments