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 committed Mar 11, 2024
1 parent b4ff791 commit c3ab6b6
Show file tree
Hide file tree
Showing 2 changed files with 4 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 @@ -1721,6 +1721,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 @@ -1772,6 +1773,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

0 comments on commit c3ab6b6

Please sign in to comment.