summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 12:54:51 -0400
committerJoey Hess2014-04-01 12:54:51 -0400
commitf9686cd3df4c1e8e39c5504eb4225799f59c265e (patch)
tree1739734a72880d0d33f982854458846041b14a82 /Propellor/Property
parent877456c5c7fad7458fb37e02c7a408a2a9c13d54 (diff)
fix container running params
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index 69d589cb..68f623e0 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -121,7 +121,7 @@ ensureContainer cid image containerprops = do
-- Start the simplesh server that will be used by propellor
-- to run commands in the container. An interactive shell
-- is also started, so the user can attach and use it if desired.
- startsimplesh = "sh -c './propellor --simplesh " ++ namedPipe cid ++ " & ; bash -l'"
+ startsimplesh = ["sh" ++ "-c" ++ "./propellor --simplesh " ++ namedPipe cid ++ " & ; bash -l"]
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $
pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
@@ -139,7 +139,7 @@ ensureContainer cid image containerprops = do
, workdir localdir
]
- go img = ifM (runContainer img (runps ++ ["-d", "-t"]) startsimplesh)
+ go img = ifM (runContainer img (runps ++ ["-i", "-d", "-t"]) startsimplesh)
( do
setrunningident
return MadeChange
@@ -192,9 +192,9 @@ removeContainer :: ContainerId -> IO ()
removeContainer cid = void $ boolSystem "sh"
[Param "-c", Param $ dockercmd ++ " rm " ++ fromContainerId cid ]
-runContainer :: Image -> [RunParam] -> String -> IO Bool
+runContainer :: Image -> [RunParam] -> [String] -> IO Bool
runContainer image ps cmd = boolSystem dockercmd $ map Param $
- "run" : (ps ++ [image, cmd])
+ "run" : (ps ++ image : cmd)
commitContainer :: ContainerId -> IO (Maybe Image)
commitContainer cid = catchMaybeIO $