@@ -23,7 +23,7 @@ module Docker.Client.Types (
2323 , ContainerPortInfo(..)
2424 , Container(..)
2525 , ContainerState(..)
26− , Status(..)
26+ , State(..)
2727 , Digest
2828 , Label(..)
2929 , Tag
@@ -238,7 +238,7 @@ data ContainerDetails = ContainerDetails {
238238 , processLabel :: Text
239239 , resolveConfPath :: FilePath
240240 , restartCount :: Int
241− , state :: ContainerState
241+ , containerDetailsState :: ContainerState
242242 , mounts :: [Mount]
243243 }
244244 deriving (Eq, Show, Generic)
@@ -281,7 +281,7 @@ data ContainerState = ContainerState {
281281 , restarting :: Bool
282282 , running :: Bool
283283 , startedAt :: UTCTime
284− , status :: Status
284+ , state :: State
285285 }
286286 deriving (Eq, Show, Generic)
287287
@@ -511,7 +511,8 @@ data Container = Container
511511 , containerImageId :: ImageID
512512 , containerCommand :: Text
513513 , containerCreatedAt :: Int
514− , containerStatus :: Status
514+ , containerState :: State
515+ , containerStatus :: Maybe Text
515516 , containerPorts :: [ContainerPortInfo]
516517 , containerLabels :: [Label]
517518 , containerNetworks :: [Network]
@@ -527,6 +528,7 @@ instance FromJSON Container where
527528 <*> (v .: "Command") -- Doesn't exist anymore
528529 <*> (v .: "Created")
529530 <*> (v .: "State")
531+ <*> (v .: "Status")
530532 <*> (v .: "Ports")
531533 <*> (v .: "Labels")
532534 <*> (v .: "NetworkSettings" >>= parseNetworks)
@@ -537,11 +539,11 @@ instance FromJSON Container where
537539 parseNetworks _ = fail "Container NetworkSettings: Not a JSON object."
538540 parseJSON _ = fail "Container: Not a JSON object."
539541
540−-- | Represents the status of the container life cycle.
541−data Status = Created | Restarting | Running | Paused | Exited | Dead
542+-- | Represents the state of the container life cycle.
543+data State = Created | Restarting | Running | Paused | Exited | Dead
542544 deriving (Eq, Show, Generic)
543545
544−instance FromJSON Status where
546+instance FromJSON State where
545547 parseJSON (JSON.String "running") = return Running
546548 parseJSON (JSON.String "created") = return Created -- Note: Guessing on the string values of these.
547549 parseJSON (JSON.String "restarting") = return Restarting