@@ -363,16 +363,34 @@ volumes in a service:
363363 <td></td>
364364 <td>
365365 <p>The Engine mounts binds and volumes <tt>read-write</tt> unless <tt>readonly</tt> option
366- is given when mounting the bind or volume.
366+ is given when mounting the bind or volume. Note that setting <tt>readonly</tt> for a
367+ bind-mount does not make its submounts <tt>readonly</tt> on the current Linux implementation. See also <tt>bind-nonrecursive</tt>.
367368 <ul>
368369 <li><tt>true</tt> or <tt>1</tt> or no value: Mounts the bind or volume read-only.</li>
369370 <li><tt>false</tt> or <tt>0</tt>: Mounts the bind or volume read-write.</li>
370371 </ul></p>
371372 </td>
372373 </tr >
374+ </table >
375+
376+ #### Options for Bind Mounts
377+
378+ The following options can only be used for bind mounts (` type=bind ` ):
379+
380+
381+ <table >
382+ <tr >
383+ <th>Option</th>
384+ <th>Description</th>
385+ </tr >
386+ <tr >
387+ <td><b>bind-propagation</b></td>
388+ <td>
389+ <p>See the <a href="#bind-propagation">bind propagation section</a>.</p>
390+ </td>
391+ </tr >
373392 <tr >
374393 <td><b>consistency</b></td>
375- <td></td>
376394 <td>
377395 <p>The consistency requirements for the mount; one of
378396 <ul>
@@ -384,9 +402,24 @@ volumes in a service:
384402 </p>
385403 </td>
386404 </tr >
405+ <tr >
406+ <td><b>bind-nonrecursive</b></td>
407+ <td>
408+ By default, submounts are recursively bind-mounted as well. However, this behavior can be confusing when a
409+ bind mount is configured with <tt>readonly</tt> option, because submounts are not mounted as read-only.
410+ Set <tt>bind-nonrecursive</tt> to disable recursive bind-mount.<br />
411+ <br />
412+ A value is optional:<br />
413+ <br />
414+ <ul>
415+ <li><tt>true</tt> or <tt>1</tt>: Disables recursive bind-mount.</li>
416+ <li><tt>false</tt> or <tt>0</tt>: Default if you do not provide a value. Enables recursive bind-mount.</li>
417+ </ul>
418+ </td>
419+ </tr >
387420</table >
388421
389- #### Bind Propagation
422+ ##### Bind propagation
390423
391424Bind propagation refers to whether or not mounts created within a given
392425bind mount or named volume can be propagated to replicas of that mount. Consider
@@ -423,7 +456,7 @@ volumes do not support bind propagation.
423456For more information about bind propagation, see the
424457[ Linux kernel documentation for shared subtree] ( https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt ) .
425458
426- #### Options for Named Volumes
459+ #### Options for named volumes
427460
428461The following options can only be used for named volumes (` type=volume ` ):
429462
@@ -459,9 +492,9 @@ The following options can only be used for named volumes (`type=volume`):
459492 the Engine copies those files and directories into the volume, allowing
460493 the host to access them. Set <tt>volume-nocopy</tt> to disable copying files
461494 from the container's filesystem to the volume and mount the empty volume.<br />
462-
463- A value is optional:
464-
495+ <br />
496+ A value is optional:<br />
497+ <br />
465498 <ul>
466499 <li><tt>true</tt> or <tt>1</tt>: Default if you do not provide a value. Disables copying.</li>
467500 <li><tt>false</tt> or <tt>0</tt>: Enables copying.</li>
0 commit comments