summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2015-06-09 17:09:09 -0400
committerJoey Hess2015-06-09 17:09:09 -0400
commit723f47d1ac6ebaddbe8df112a4b12ce7520dc89a (patch)
tree76c314d8d1746b792c083337b3dbe7a55eefdb9f /src
parentfd83259d8c636ac23478555a9ddbfa4e95fdf416 (diff)
parent9415bfb4adb61dedfc1301ff0bc7310cec40455a (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Docker.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs
index 1dcc3522..d3e60fc2 100644
--- a/src/Propellor/Property/Docker.hs
+++ b/src/Propellor/Property/Docker.hs
@@ -34,6 +34,7 @@ module Propellor.Property.Docker (
memory,
cpuShares,
link,
+ environment,
ContainerAlias,
restartAlways,
restartOnFailure,
@@ -348,6 +349,11 @@ restartOnFailure (Just n) = runProp "restart" ("on-failure:" ++ show n)
restartNever :: Property HasInfo
restartNever = runProp "restart" "no"
+-- | Set environment variable with a tuple composed by the environment
+-- variable name and its value.
+environment :: (String, String) -> Property HasInfo
+environment (k, v) = runProp "env" $ k ++ "=" ++ v
+
-- | A container is identified by its name, and the host
-- on which it's deployed.
data ContainerId = ContainerId