summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 20:23:11 -0400
committerJoey Hess2014-04-01 20:23:11 -0400
commit2b7556fe3afe7bed1346bef91c7669fbb7078975 (patch)
tree03b6a91cbd2d12b26f282b3b622174d34d8daf1d /Propellor/Property
parent60960d78533466c55ae5b204099d6a2f22160c67 (diff)
allow arbitrary workdir
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index a16784f7..d252900c 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -22,6 +22,7 @@ import Utility.SafeCommand
import Utility.Path
import Control.Concurrent.Async
+import System.Posix.Directory
dockercmd :: String
dockercmd = "docker.io"
@@ -146,8 +147,6 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
-- name the container in a predictable way so we
-- and the user can easily find it later
, name (fromContainerId cid)
- -- cd to propellor directory
- , workdir localdir
]
chaincmd = ["./propellor", "--continue", show $ ChainDocker $ show ident]
@@ -183,6 +182,7 @@ chain :: String -> IO ()
chain s = case readish s of
Nothing -> error $ "Invalid ContainerId: " ++ s
Just ident@(ContainerIdent _image hn cn _rp) -> do
+ changeWorkingDirectory localdir
let cid = ContainerId hn cn
writeFile propellorIdent (show ident)
void $ async $ simpleSh $ namedPipe cid
@@ -294,7 +294,6 @@ volume :: String -> Containerized Property
volume = runProp "volume"
-- | Work dir inside the container.
--- Must contain ./propellor! (Normally set automatically.)
workdir :: String -> Containerized Property
workdir = runProp "workdir"