summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-08 01:21:23 -0400
committerJoey Hess2014-04-08 01:41:59 -0400
commitc62c606c0e459fe19f258bcf5ba80958349f3e1e (patch)
treecd9dad52a4787007089110018489e7245d64998e /Propellor/Property
parent1d07360f74a06436f669a992e5ca589f07106c4e (diff)
support volumes-from
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index cc6f83c4..2014e5bd 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -158,10 +158,18 @@ publish = runProp "publish"
user :: String -> Containerized Property
user = runProp "user"
--- | Bind mount a volume
+-- | Mount a volume
+-- Create a bind mount with: [host-dir]:[container-dir]:[rw|ro]
+-- With just a directory, creates a volume in the container.
volume :: String -> Containerized Property
volume = runProp "volume"
+-- | Mount a volume from the specified container into the current
+-- container.
+volumes_from :: ContainerName -> Containerized Property
+volumes_from cn = genProp "volumes-rom" $ \hn ->
+ fromContainerId (ContainerId hn cn)
+
-- | Work dir inside the container.
workdir :: String -> Containerized Property
workdir = runProp "workdir"