fix container running params

This commit is contained in:
Joey Hess 2014-04-01 12:54:51 -04:00
parent 877456c5c7
commit f9686cd3df
1 changed files with 4 additions and 4 deletions

View File

@ -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 $