summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-08 00:49:49 -0400
committerJoey Hess2014-04-08 00:49:49 -0400
commit2b687fbca387c56b97f2313fedac4ec75a58d87b (patch)
treeae9e6e18e126c6d33a9b0becc95a1a9b6a4e997c /Propellor/Property
parent5c730c6f38ddc7d1b35b206f10c3146589af9d63 (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 888e76c6..784b1137 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -18,6 +18,7 @@ import Utility.Path
import Control.Concurrent.Async
import System.Posix.Directory
import Data.List
+import Data.List.Utils
-- | Configures docker with an authentication file, so that images can be
-- pushed to index.docker.io.
@@ -372,7 +373,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