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:09:20 +0100
commit275ea7303cfdb79c042da1b710622aee17a488a8 (patch)
treec027f6e629a4eea51d0ddc3887b9eb3f3f7165ee /interface-definitions/container.xml.in
parent1e2238e3870309f48506a25c730661936b09a9d1 (diff)
downloadvyos-1x-275ea7303cfdb79c042da1b710622aee17a488a8.tar.gz
vyos-1x-275ea7303cfdb79c042da1b710622aee17a488a8.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.
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>