docker linked containers can have multiple names, separated by ','
Look at the name that contains a containerid
This commit is contained in:
parent
5c730c6f38
commit
2b687fbca3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue