summaryrefslogtreecommitdiff
path: root/interface-definitions/container.xml.in
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-01-21 14:09:20 +0100
committerChristian Breunig <christian@breunig.cc>2023-01-21 14:10:57 +0100
commit7b7a8bf2923d06cdaad10663700e3bccc3fb7627 (patch)
treeafbe55f1b7c5ba8469c89f4de130a84927c92988 /interface-definitions/container.xml.in
parente6670b7277147ddf3fa72a9522069fef7d9430f4 (diff)
downloadvyos-1x-7b7a8bf2923d06cdaad10663700e3bccc3fb7627.tar.gz
vyos-1x-7b7a8bf2923d06cdaad10663700e3bccc3fb7627.zip
container: T4947: support mounting container volumes as ro or rw
Whenever a container is used and a folder is mounted, this happenes as read-write which is the default in Docker/Podman - so is the default in VyOS. A new option is added "set container name foo volume mode <ro|rw>" to specify explicitly if rw (default) or ro should be used for this mounted folder. (cherry picked from commit 275ea7303cfdb79c042da1b710622aee17a488a8)
Diffstat (limited to 'interface-definitions/container.xml.in')
-rw-r--r--interface-definitions/container.xml.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index 4bac305d1..b61664125 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -274,6 +274,26 @@
</valueHelp>
</properties>
</leafNode>
+ <leafNode name="mode">
+ <properties>
+ <help>Volume access mode ro/rw</help>
+ <completionHelp>
+ <list>ro rw</list>
+ </completionHelp>
+ <valueHelp>
+ <format>ro</format>
+ <description>Volume mounted into the container as read-only</description>
+ </valueHelp>
+ <valueHelp>
+ <format>rw</format>
+ <description>Volume mounted into the container as read-write</description>
+ </valueHelp>
+ <constraint>
+ <regex>(ro|rw)</regex>
+ </constraint>
+ </properties>
+ <defaultValue>rw</defaultValue>
+ </leafNode>
</children>
</tagNode>
</children>