From 1406ce65073d9d976a055eef73fb545f45c97175 Mon Sep 17 00:00:00 2001 From: Milas Bowman Date: Fri, 12 Apr 2024 03:32:32 -0400 Subject: [PATCH] compose: add volume subpath (#19778) Imported from compose-spec. Signed-off-by: Milas Bowman --- content/compose/compose-file/05-services.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/compose/compose-file/05-services.md b/content/compose/compose-file/05-services.md index 1e58640929..e6d2af8109 100644 --- a/content/compose/compose-file/05-services.md +++ b/content/compose/compose-file/05-services.md @@ -1739,6 +1739,7 @@ services: target: /data volume: nocopy: true + subpath: sub - type: bind source: /var/run/postgres/postgres.sock target: /var/run/postgres/postgres.sock @@ -1790,6 +1791,7 @@ expressed in the short form. - `selinux`: The SELinux re-labeling option `z` (shared) or `Z` (private) - `volume`: Configures additional volume options: - `nocopy`: Flag to disable copying of data from a container when a volume is created. + - `subpath`: Path inside a volume to mount instead of the volume root. - `tmpfs`: Configures additional tmpfs options: - `size`: The size for the tmpfs mount in bytes (either numeric or as bytes unit). - `mode`: The file mode for the tmpfs mount as Unix permission bits as an octal number. Introduced in Docker Compose version [2.14.0](../release-notes.md#2260).