summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-08 01:21:23 -0400
committerJoey Hess2014-04-08 01:21:23 -0400
commit3068fdbe78cb86a9272b1ce5200653f5331fb173 (patch)
tree4a26c4e46e7a4592874b650b740f9c9cc7fd9677 /Propellor/Property
parentbd5c0c1f520b1a050195ae7a5c7f536147906d17 (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 255b72ac..573b4c62 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -157,10 +157,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"