summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-08 00:49:49 -0400
committerJoey Hess2014-04-08 01:41:45 -0400
commit4f8e8077e00ea8c1d0bda199261a0239eed36959 (patch)
tree57ae63aa6d8581682868fe76671e85ee4a3e5ef3 /Propellor/Property
parent51f764793ef57e88f31c0dd210916942e09897c3 (diff)
docker linked containers can have multiple names, separated by ','
Look at the name that contains a containerid
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index 07c49b47..50a816d1 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -19,6 +19,7 @@ import Control.Concurrent.Async
import System.Posix.Directory
import System.Posix.Process
import Data.List
+import Data.List.Utils
-- | Configures docker with an authentication file, so that images can be
-- pushed to index.docker.io.
@@ -390,7 +391,8 @@ data ContainerFilter = RunningContainers | AllContainers
-- | Only lists propellor managed containers.
listContainers :: ContainerFilter -> IO [ContainerId]
listContainers status =
- catMaybes . map toContainerId . catMaybes . map (lastMaybe . words) . lines
+ catMaybes . map toContainerId . concat . map (split ",")
+ . catMaybes . map (lastMaybe . words) . lines
<$> readProcess dockercmd ps
where
ps