Skip to content

Commit

Permalink
Add volume subpath property
Browse files Browse the repository at this point in the history
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
  • Loading branch information
vvoland authored and ndeloof committed Mar 21, 2024
1 parent 6ffbdbf commit 3da63a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 05-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,7 @@ services:
target: /data
volume:
nocopy: true
subpath: sub
- type: bind
source: /var/run/postgres/postgres.sock
target: /var/run/postgres/postgres.sock
Expand Down Expand Up @@ -1775,6 +1776,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.
Expand Down
3 changes: 2 additions & 1 deletion schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@
"volume": {
"type": "object",
"properties": {
"nocopy": {"type": "boolean"}
"nocopy": {"type": "boolean"},
"subpath": {"type": "string"}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
Expand Down
2 changes: 2 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,7 @@ services:
target: /data
volume:
nocopy: true
subpath: sub
- type: bind
source: /var/run/postgres/postgres.sock
target: /var/run/postgres/postgres.sock
Expand Down Expand Up @@ -1988,6 +1989,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.
Expand Down

0 comments on commit 3da63a6

Please sign in to comment.