summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Docker.hs
diff options
context:
space:
mode:
authorJoey Hess2015-09-08 22:37:11 -0400
committerJoey Hess2015-09-08 22:37:11 -0400
commit386281202d5cb526d1b35022b3709b1f1064f68e (patch)
tree7dcea4e59765d4e1bb76ca23b864befc4546068a /src/Propellor/Types/Docker.hs
parentb38cedc0a81085dd5e4267866d1f460054d9c50d (diff)
parentd7a9157e7e1e8f447864d9d0cdd20ed1839fc23c (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Types/Docker.hs')
-rw-r--r--src/Propellor/Types/Docker.hs18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Propellor/Types/Docker.hs b/src/Propellor/Types/Docker.hs
index 3eafa59d..a1ed4cd9 100644
--- a/src/Propellor/Types/Docker.hs
+++ b/src/Propellor/Types/Docker.hs
@@ -1,25 +1,31 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+
module Propellor.Types.Docker where
-import Propellor.Types.OS
+import Propellor.Types
import Propellor.Types.Empty
+import Propellor.Types.Info
import Data.Monoid
import qualified Data.Map as M
-data DockerInfo h = DockerInfo
+data DockerInfo = DockerInfo
{ _dockerRunParams :: [DockerRunParam]
- , _dockerContainers :: M.Map String h
+ , _dockerContainers :: M.Map String Host
}
- deriving (Show)
+ deriving (Show, Typeable)
+
+instance IsInfo DockerInfo where
+ propigateInfo _ = False
-instance Monoid (DockerInfo h) where
+instance Monoid DockerInfo where
mempty = DockerInfo mempty mempty
mappend old new = DockerInfo
{ _dockerRunParams = _dockerRunParams old <> _dockerRunParams new
, _dockerContainers = M.union (_dockerContainers old) (_dockerContainers new)
}
-instance Empty (DockerInfo h) where
+instance Empty DockerInfo where
isEmpty i = and
[ isEmpty (_dockerRunParams i)
, isEmpty (_dockerContainers i)