Skip to content

Commit

Permalink
manage mode on volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Moussaud committed Mar 15, 2016
1 parent 0655d61 commit 503bcb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/docker/docker-create.sh.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "Running ${deployed_container.id}"
<#assign cmdLine = ["docker", "create"] />

<#if (deployed_container.publishAllExposedPorts)>
<#assign cmdLine = cmdLine + ["-P"]/>
<#assign cmdLine = cmdLine + ["--publish-all"]/>
</#if>
<#if (deployed_container.restartAlways)>
<#assign cmdLine = cmdLine + ["--restart=always"]/>
Expand All @@ -33,7 +33,7 @@ echo "Running ${deployed_container.id}"
<#assign cmdLine = cmdLine + ["--link=${link.name}:${link.alias}"]/>
</#list>
<#list deployed_container.volumes as volume>
<#assign cmdLine = cmdLine + ["-v ${volume.source}:${volume.destination}"]/>
<#assign cmdLine = cmdLine + ["--volume=${volume.source}:${volume.destination}:${volume.mode}"]/>
</#list>
<#list deployed_container.volumesFrom as volume>
<#assign cmdLine = cmdLine + ["--volumes-from=${volume}"]/>
Expand Down
8 changes: 6 additions & 2 deletions src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
<generate-deployable type="docker.VolumeSpec" extends="udm.BaseEmbeddedDeployable"/>
<property name="source" description="location on the host"/>
<property name="destination" description="location inside the container"/>
<property name="mode" default="rw" description="mount mode rw/ro">
<rule type="regex" pattern="rw|ro"
message="Mode can be either 'rw' or 'ro'. "/>
</property>
</type>

<type type="docker.Link" deployable-type="docker.LinkSpec" container-type="docker.RunContainer" extends="udm.BaseEmbeddedDeployed">
Expand Down Expand Up @@ -190,7 +194,7 @@
description="Specify labels for the created engine key=value"/>
<property name="machineName" required="false" category="Provisioning"/>
<property name="environmentId" required="false" category="Provisioning"/>
<property name="containerTags" required="false" kind="set_of_string" category="Provisioning" description="Deployment tags on the created ci" />
<property name="containerTags" required="false" kind="set_of_string" category="Provisioning" description="Deployment tags on the created ci"/>
</type>

<type type="docker.DeployedSwarmMachine" extends="udm.BaseDeployed" container-type="overthere.Host" deployable-type="docker.SwarmMachineSpec">
Expand All @@ -208,7 +212,7 @@
description="Specify labels for the created engine key=value" category="Engine"/>
<property name="machineName" required="false" category="Provisioning"/>
<property name="environmentId" required="false" category="Provisioning"/>
<property name="containerTags" required="false" kind="set_of_string" category="Provisioning" description="Deployment tags on the created ci" />
<property name="containerTags" required="false" kind="set_of_string" category="Provisioning" description="Deployment tags on the created ci"/>
</type>
<!-- /Provisioning -->

Expand Down

0 comments on commit 503bcb5

Please sign in to comment.