diff options
| author | Antoine Eiche <lewo@abesis.fr> | 2015-06-03 17:50:12 +0200 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-06-04 12:16:29 -0400 |
| commit | e1f2d4a8f1bf6f47ec7d091d2dbeb79a0d3ece02 (patch) | |
| tree | 52a29738cd623dc17fc3f66f92698f2c5ce58388 /src/Propellor/Property/Docker.hs | |
| parent | fd9d172bcd9f217b67a60ed2e694bad4f6602d32 (diff) | |
Add Docker environment property which allows to specify environment variables to containers.
Diffstat (limited to 'src/Propellor/Property/Docker.hs')
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 6 |
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 |
