Skip to content

Commit

Permalink
Added volume bind option SELinux :z :Z
Browse files Browse the repository at this point in the history
Related with compose-spec/compose-go#213

This feature describe the SELinux field for setting the :z or :Z
bind option for relabeling SELinux label.

It fixes compose-spec#191

References:
- https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label

Signed-off-by: Tymoteusz Blazejczyk <tymoteusz.blazejczyk@tymonx.com>
  • Loading branch information
tymonx committed Jan 1, 2022
1 parent e8db802 commit abb89db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema/compose-spec.json
Expand Up @@ -410,7 +410,8 @@
"type": "object",
"properties": {
"propagation": {"type": "string"},
"create_host_path": {"type": "boolean"}
"create_host_path": {"type": "boolean"},
"selinux": {"type": "string", "enum": ["z", "Z"]}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
Expand Down
1 change: 1 addition & 0 deletions spec.md
Expand Up @@ -1820,6 +1820,7 @@ expressed in the short form.
- `create_host_path`: create a directory at the source path on host if there is nothing present.
Do nothing if there is something present at the path. This is automatically implied by short syntax
for backward compatibility with docker-compose legacy.
- `selinux`: the SELinux re-labeling option `z` (shared) or `Z` (private)
- `volume`: configure additional volume options
- `nocopy`: flag to disable copying of data from a container when a volume is created
- `tmpfs`: configure additional tmpfs options
Expand Down

0 comments on commit abb89db

Please sign in to comment.