summaryrefslogtreecommitdiff
path: root/interface-definitions/containers.xml.in
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions/containers.xml.in')
-rw-r--r--interface-definitions/containers.xml.in59
1 files changed, 53 insertions, 6 deletions
diff --git a/interface-definitions/containers.xml.in b/interface-definitions/containers.xml.in
index 124b1f65e..d990e41a3 100644
--- a/interface-definitions/containers.xml.in
+++ b/interface-definitions/containers.xml.in
@@ -9,6 +9,10 @@
<tagNode name="name">
<properties>
<help>Container name</help>
+ <constraint>
+ <regex>^[-a-zA-Z0-9]+$</regex>
+ </constraint>
+ <constraintErrorMessage>Container name must be alphanumeric and can contain hyphens</constraintErrorMessage>
</properties>
<children>
<leafNode name="allow-host-networks">
@@ -17,14 +21,15 @@
<valueless/>
</properties>
</leafNode>
- <leafNode name="description">
- <properties>
- <help>Container description</help>
- </properties>
- </leafNode>
+ #include <include/generic-description.xml.i>
+ #include <include/generic-disable-node.xml.i>
<tagNode name="environment">
<properties>
<help>Add custom environment variables</help>
+ <constraint>
+ <regex>^[-_a-zA-Z0-9]+$</regex>
+ </constraint>
+ <constraintErrorMessage>Environment variable name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
</properties>
<children>
<leafNode name="value">
@@ -43,6 +48,24 @@
<help>Image name in the hub-registry</help>
</properties>
</leafNode>
+ <leafNode name="memory">
+ <properties>
+ <help>Constrain the memory available to a container (default: 512MB)</help>
+ <valueHelp>
+ <format>u32:0</format>
+ <description>Unlimited</description>
+ </valueHelp>
+ <valueHelp>
+ <format>u32:1-16384</format>
+ <description>Container memory in megabytes (MB)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-16384"/>
+ </constraint>
+ <constraintErrorMessage>Container memory must be in range 0 to 16384 MB</constraintErrorMessage>
+ </properties>
+ <defaultValue>512</defaultValue>
+ </leafNode>
<tagNode name="network">
<properties>
<help>Attach user defined network to container</help>
@@ -56,7 +79,7 @@
<help>Set IPv4 static address to container (optional)</help>
<valueHelp>
<format>ipv4</format>
- <description>IPv4 address (x.x.x.1 reserved)</description>
+ <description>IPv4 address</description>
</valueHelp>
<constraint>
<validator name="ipv4-address"/>
@@ -115,6 +138,30 @@
</leafNode>
</children>
</tagNode>
+ <leafNode name="restart">
+ <properties>
+ <help>Mount a volume into the container</help>
+ <completionHelp>
+ <list>no on-failure always</list>
+ </completionHelp>
+ <valueHelp>
+ <format>no</format>
+ <description>Do not restart containers on exit</description>
+ </valueHelp>
+ <valueHelp>
+ <format>on-failure</format>
+ <description>Restart containers when they exit with a non-zero exit code, retrying indefinitely (default)</description>
+ </valueHelp>
+ <valueHelp>
+ <format>always</format>
+ <description>Restart containers when they exit, regardless of status, retrying indefinitely</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(no|on-failure|always)$</regex>
+ </constraint>
+ </properties>
+ <defaultValue>on-failure</defaultValue>
+ </leafNode>
<tagNode name="volume">
<properties>
<help>Mount a volume into the container</help>