summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Docker.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Types/Docker.hs')
-rw-r--r--src/Propellor/Types/Docker.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Propellor/Types/Docker.hs b/src/Propellor/Types/Docker.hs
index 42a65923..3eafa59d 100644
--- a/src/Propellor/Types/Docker.hs
+++ b/src/Propellor/Types/Docker.hs
@@ -1,6 +1,7 @@
module Propellor.Types.Docker where
import Propellor.Types.OS
+import Propellor.Types.Empty
import Data.Monoid
import qualified Data.Map as M
@@ -18,6 +19,12 @@ instance Monoid (DockerInfo h) where
, _dockerContainers = M.union (_dockerContainers old) (_dockerContainers new)
}
+instance Empty (DockerInfo h) where
+ isEmpty i = and
+ [ isEmpty (_dockerRunParams i)
+ , isEmpty (_dockerContainers i)
+ ]
+
newtype DockerRunParam = DockerRunParam (HostName -> String)
instance Show DockerRunParam where