summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Docker.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-05-27 11:55:07 -0400
committerJoey Hess <joeyh@joeyh.name>2015-05-27 11:55:07 -0400
commit0361b016bad7448e908770555bb8c7207769f09f (patch)
treefd1c7945eed9c77e9d689003ff5a31e23d573b13 /src/Propellor/Property/Docker.hs
parent5492c4f12c0daafe172d40ea22ea0ca635305d25 (diff)
parentc4fc8714fe21c83746886476279bcb2f8b47ccdd (diff)
Merge branch 'joeyconfig'
Conflicts: privdata.joey/privdata.gpg
Diffstat (limited to 'src/Propellor/Property/Docker.hs')
-rw-r--r--src/Propellor/Property/Docker.hs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs
index fdc312ce..3b8751f3 100644
--- a/src/Propellor/Property/Docker.hs
+++ b/src/Propellor/Property/Docker.hs
@@ -426,16 +426,14 @@ runningContainer cid@(ContainerId hn cn) image runps = containerDesc cid $ prope
retry (n-1) a
_ -> return v
- go img = do
- liftIO $ do
- clearProvisionedFlag cid
- createDirectoryIfMissing True (takeDirectory $ identFile cid)
- shim <- liftIO $ Shim.setup (localdir </> "propellor") Nothing (localdir </> shimdir cid)
- liftIO $ writeFile (identFile cid) (show ident)
- ensureProperty $ property "run" $ liftIO $
- toResult <$> runContainer img
- (runps ++ ["-i", "-d", "-t"])
- [shim, "--continue", show (DockerInit (fromContainerId cid))]
+ go img = liftIO $ do
+ clearProvisionedFlag cid
+ createDirectoryIfMissing True (takeDirectory $ identFile cid)
+ shim <- Shim.setup (localdir </> "propellor") Nothing (localdir </> shimdir cid)
+ writeFile (identFile cid) (show ident)
+ toResult <$> runContainer img
+ (runps ++ ["-i", "-d", "-t"])
+ [shim, "--continue", show (DockerInit (fromContainerId cid))]
-- | Called when propellor is running inside a docker container.
-- The string should be the container's ContainerId.