propellor spin

This commit is contained in:
Joey Hess 2014-04-04 15:03:03 -04:00
parent 0b7fb01032
commit 50a9e826a3
Failed to extract signature
1 changed files with 8 additions and 3 deletions

View File

@ -243,9 +243,14 @@ runningContainer cid@(ContainerId hn cn) image containerprops = containerDesc ci
ident = ContainerIdent image hn cn runps
getrunningident :: IO (Maybe ContainerIdent)
getrunningident = catchDefaultIO Nothing $
simpleShClient (namedPipe cid) "cat" [propellorIdent] $
pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $ \vs -> do
let l = (extractident) vs
print l
print vs
return l
extractident :: [Resp] -> Maybe ContainerIdent
extractident = headMaybe . catMaybes . map readish . catMaybes . map getStdout
runps = getRunParams $ containerprops ++
-- expose propellor directory inside the container