@@ -255,7 +255,7 @@ data DockerClientOpts = DockerClientOpts {
256defaultClientOpts :: DockerClientOpts
256defaultClientOpts :: DockerClientOpts
257defaultClientOpts = DockerClientOpts {
257defaultClientOpts = DockerClientOpts {
258− apiVer = "v1.23"
258+ apiVer = "v1.24"
259 , baseUrl = "http://127.0.0.1:2375"
259 , baseUrl = "http://127.0.0.1:2375"
@@ -395,24 +395,24 @@ instance FromJSON Networks where
395 parseJSON _ = fail "Networks is not an object"
395 parseJSON _ = fail "Networks is not an object"
397data NetworkSettings = NetworkSettings {
397data NetworkSettings = NetworkSettings {
398− networkSettingsBridge :: Text
398+ networkSettingsBridge :: Text
399− , networkSettingsSandboxId :: Text
399+ , networkSettingsSandboxId :: Text
400− , networkSettingsHairpinMode :: Bool
400+ , networkSettingsHairpinMode :: Bool
401− , networkSettingsLinkLocalIPv6Address :: Text
401+ , networkSettingsLinkLocalIPv6Address :: Text
402 , networkSettingsLinkLocalIPv6PrefixLen :: Int
402 , networkSettingsLinkLocalIPv6PrefixLen :: Int
403− , networkSettingsPorts :: PortBindings
403+ , networkSettingsPorts :: PortBindings
404− , networkSettingsSandboxKey :: Text
404+ , networkSettingsSandboxKey :: Text
405− , networkSettingsSecondaryIPAddresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
405+ , networkSettingsSecondaryIPAddresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
406 , networkSettingsSecondaryIPv6Addresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
406 , networkSettingsSecondaryIPv6Addresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
407− , networkSettingsEndpointID :: Text
407+ , networkSettingsEndpointID :: Text
408− , networkSettingsGateway :: Text
408+ , networkSettingsGateway :: Text
409− , networkSettingsGlobalIPv6Address :: Text
409+ , networkSettingsGlobalIPv6Address :: Text
410− , networkSettingsGlobalIPv6PrefixLen :: Int
410+ , networkSettingsGlobalIPv6PrefixLen :: Int
411− , networkSettingsIpAddress :: Text
411+ , networkSettingsIpAddress :: Text
412− , networkSettingsIpPrefixLen :: Int
412+ , networkSettingsIpPrefixLen :: Int
413− , networkSettingsIpv6Gateway :: Text
413+ , networkSettingsIpv6Gateway :: Text
414− , networkSettingsMacAddress :: Text
414+ , networkSettingsMacAddress :: Text
415− , networkSettingsNetworks :: Networks
415+ , networkSettingsNetworks :: Networks
417 deriving (Eq, Show)
417 deriving (Eq, Show)
@@ -804,11 +804,11 @@ instance FromJSON PortType where
804 _ -> fail "PortType: Invalid port type."
804 _ -> fail "PortType: Invalid port type."
806-- newtype NetworkInterface = NetworkInterface Text deriving (Eq, Show)
806-- newtype NetworkInterface = NetworkInterface Text deriving (Eq, Show)
808-- instance FromJSON NetworkInterface where
808-- instance FromJSON NetworkInterface where
809-- parseJSON (JSON.String v) = return $ NetworkInterface v
809-- parseJSON (JSON.String v) = return $ NetworkInterface v
810-- parseJSON _ = fail "Network interface is not a string."
810-- parseJSON _ = fail "Network interface is not a string."
812-- instance ToJSON NetworkInterface where
812-- instance ToJSON NetworkInterface where
813-- toJSON (NetworkInterface i) = JSON.String i
813-- toJSON (NetworkInterface i) = JSON.String i
@@ -854,7 +854,7 @@ instance ToJSON PortBindings where
854 toJSON (PortBindings (p:ps)) = toJSON (p:ps)
854 toJSON (PortBindings (p:ps)) = toJSON (p:ps)
856data HostPort = HostPort {
856data HostPort = HostPort {
857− hostIp :: Text
857+ hostIp :: Text
858 , hostPost :: Port
858 , hostPost :: Port
860 deriving (Eq, Show)
860 deriving (Eq, Show)
@@ -871,14 +871,14 @@ instance FromJSON HostPort where
872-- newtype HostPorts = HostPorts [HostPort]
872-- newtype HostPorts = HostPorts [HostPort]
873-- deriving (Eq, Show)
873-- deriving (Eq, Show)
875-- instance ToJSON HostPorts where
875-- instance ToJSON HostPorts where
876-- toJSON (HostPorts hps) = toJSON hps
876-- toJSON (HostPorts hps) = toJSON hps
878-- instance FromJSON HostPorts where
878-- instance FromJSON HostPorts where
879-- parseJSON (JSON.Object o) = do
879-- parseJSON (JSON.Object o) = do
880-- HostPorts <$> HM.foldlWithKey' f (return []) o
880-- HostPorts <$> HM.foldlWithKey' f (return []) o
883-- f accM k v = do
883-- f accM k v = do
884-- acc <- accM
884-- acc <- accM
@@ -976,7 +976,7 @@ instance FromJSON HostConfig where
976 parseJSON _ = fail "HostConfig is not an object."
976 parseJSON _ = fail "HostConfig is not an object."
978instance ToJSON HostConfig where
978instance ToJSON HostConfig where
979− toJSON HostConfig{..} =
979+ toJSON HostConfig{..} =
980 let arr = [
980 let arr = [
981 "Binds" .= binds
981 "Binds" .= binds
982 , "ContainerIDFile" .= containerIDFile
982 , "ContainerIDFile" .= containerIDFile
@@ -1004,7 +1004,7 @@ instance ToJSON HostConfig where
1005 object $ arr <> ( resourcesArr resources)
1005 object $ arr <> ( resourcesArr resources)
1008 -- JP: Not sure if this is better than a separate ToJSON instance with a bunch of `HM.insert`s.
1008 -- JP: Not sure if this is better than a separate ToJSON instance with a bunch of `HM.insert`s.
1009 resourcesArr ContainerResources{..} = [
1009 resourcesArr ContainerResources{..} = [
1010 "CpuShares" .= cpuShares
1010 "CpuShares" .= cpuShares
@@ -1025,8 +1025,8 @@ instance ToJSON HostConfig where
1025 , "OomKillDisable" .= oomKillDisable
1025 , "OomKillDisable" .= oomKillDisable
1026 , "Ulimits" .= ulimits
1026 , "Ulimits" .= ulimits
1032-- { "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }
1032-- { "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }
@@ -1046,7 +1046,7 @@ instance ToJSON Ulimit where
1046 fieldLabelModifier = drop 5}
1046 fieldLabelModifier = drop 5}
1048data DeviceWeight = DeviceWeight {
1048data DeviceWeight = DeviceWeight {
1049− deviceWeightPath :: FilePath
1049+ deviceWeightPath :: FilePath
1050 , deviceWeightWeight :: Text
1050 , deviceWeightWeight :: Text
1052 deriving (Show, Eq)
1052 deriving (Show, Eq)