summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 13:58:15 -0400
committerJoey Hess2014-04-01 13:58:15 -0400
commitd73dd30044507220bf85311dca16e77988debd7c (patch)
tree5cfeeb128ef843bdedcf1035c1e382442c11b806
parent79cbdf35b1188d83e64a713efa82bc7a0a72a181 (diff)
fix chaining into docker
-rw-r--r--Propellor/Property/Docker.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index d849497d..b8e1a2c4 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -121,11 +121,6 @@ runningContainer cid@(ContainerId hn cn) image containerprops = Property (contai
where
ident = ContainerIdent image hn cn runps
- -- 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"]
-
getrunningident = catchDefaultIO Nothing $
simpleShClient (namedPipe cid) "cat" [propellorIdent] $
pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
@@ -140,7 +135,9 @@ runningContainer cid@(ContainerId hn cn) image containerprops = Property (contai
, workdir localdir
]
- go img = ifM (runContainer img (runps ++ ["-i", "-d", "-t"]) startsimplesh)
+ chaincmd = ["./propellor", show $ ChainDocker $ show ident]
+
+ go img = ifM (runContainer img (runps ++ ["-i", "-d", "-t"]) chaincmd)
( return MadeChange
, return FailedChange
)