@@ -255,7 +255,7 @@ data DockerClientOpts = DockerClientOpts {
255255
256256defaultClientOpts :: DockerClientOpts
257257defaultClientOpts = DockerClientOpts {
258− apiVer = "v1.23"
258+ apiVer = "v1.24"
259259 , baseUrl = "http://127.0.0.1:2375"
260260 }
261261
@@ -395,24 +395,24 @@ instance FromJSON Networks where
395395 parseJSON _ = fail "Networks is not an object"
396396
397397data NetworkSettings = NetworkSettings {
398− networkSettingsBridge :: Text
399− , networkSettingsSandboxId :: Text
400− , networkSettingsHairpinMode :: Bool
401− , networkSettingsLinkLocalIPv6Address :: Text
398+ networkSettingsBridge :: Text
399+ , networkSettingsSandboxId :: Text
400+ , networkSettingsHairpinMode :: Bool
401+ , networkSettingsLinkLocalIPv6Address :: Text
402402 , networkSettingsLinkLocalIPv6PrefixLen :: Int
403− , networkSettingsPorts :: PortBindings
404− , networkSettingsSandboxKey :: Text
405− , networkSettingsSecondaryIPAddresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
403+ , networkSettingsPorts :: PortBindings
404+ , networkSettingsSandboxKey :: Text
405+ , networkSettingsSecondaryIPAddresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
406406 , networkSettingsSecondaryIPv6Addresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
407− , networkSettingsEndpointID :: Text
408− , networkSettingsGateway :: Text
409− , networkSettingsGlobalIPv6Address :: Text
410− , networkSettingsGlobalIPv6PrefixLen :: Int
411− , networkSettingsIpAddress :: Text
412− , networkSettingsIpPrefixLen :: Int
413− , networkSettingsIpv6Gateway :: Text
414− , networkSettingsMacAddress :: Text
415− , networkSettingsNetworks :: Networks
407+ , networkSettingsEndpointID :: Text
408+ , networkSettingsGateway :: Text
409+ , networkSettingsGlobalIPv6Address :: Text
410+ , networkSettingsGlobalIPv6PrefixLen :: Int
411+ , networkSettingsIpAddress :: Text
412+ , networkSettingsIpPrefixLen :: Int
413+ , networkSettingsIpv6Gateway :: Text
414+ , networkSettingsMacAddress :: Text
415+ , networkSettingsNetworks :: Networks
416416 }
417417 deriving (Eq, Show)
418418
@@ -804,11 +804,11 @@ instance FromJSON PortType where
804804 _ -> fail "PortType: Invalid port type."
805805
806806-- newtype NetworkInterface = NetworkInterface Text deriving (Eq, Show)
807−--
807+--
808808-- instance FromJSON NetworkInterface where
809809-- parseJSON (JSON.String v) = return $ NetworkInterface v
810810-- parseJSON _ = fail "Network interface is not a string."
811−--
811+--
812812-- instance ToJSON NetworkInterface where
813813-- toJSON (NetworkInterface i) = JSON.String i
814814
@@ -854,7 +854,7 @@ instance ToJSON PortBindings where
854854 toJSON (PortBindings (p:ps)) = toJSON (p:ps)
855855
856856data HostPort = HostPort {
857− hostIp :: Text
857+ hostIp :: Text
858858 , hostPost :: Port
859859 }
860860 deriving (Eq, Show)
@@ -871,14 +871,14 @@ instance FromJSON HostPort where
871871
872872-- newtype HostPorts = HostPorts [HostPort]
873873-- deriving (Eq, Show)
874−--
874+--
875875-- instance ToJSON HostPorts where
876876-- toJSON (HostPorts hps) = toJSON hps
877−--
877+--
878878-- instance FromJSON HostPorts where
879879-- parseJSON (JSON.Object o) = do
880880-- HostPorts <$> HM.foldlWithKey' f (return []) o
881−--
881+--
882882-- where
883883-- f accM k v = do
884884-- acc <- accM
@@ -976,7 +976,7 @@ instance FromJSON HostConfig where
976976 parseJSON _ = fail "HostConfig is not an object."
977977
978978instance ToJSON HostConfig where
979− toJSON HostConfig{..} =
979+ toJSON HostConfig{..} =
980980 let arr = [
981981 "Binds" .= binds
982982 , "ContainerIDFile" .= containerIDFile
@@ -1004,7 +1004,7 @@ instance ToJSON HostConfig where
10041004 in
10051005 object $ arr <> ( resourcesArr resources)
10061006
1007− where
1007+ where
10081008 -- JP: Not sure if this is better than a separate ToJSON instance with a bunch of `HM.insert`s.
10091009 resourcesArr ContainerResources{..} = [
10101010 "CpuShares" .= cpuShares
@@ -1025,8 +1025,8 @@ instance ToJSON HostConfig where
10251025 , "OomKillDisable" .= oomKillDisable
10261026 , "Ulimits" .= ulimits
10271027 ]
1028−
1029−
1028+
1029+
10301030
10311031
10321032-- { "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }
@@ -1046,7 +1046,7 @@ instance ToJSON Ulimit where
10461046 fieldLabelModifier = drop 5}
10471047
10481048data DeviceWeight = DeviceWeight {
1049− deviceWeightPath :: FilePath
1049+ deviceWeightPath :: FilePath
10501050 , deviceWeightWeight :: Text
10511051 }
10521052 deriving (Show, Eq)