@@ -29,8 +29,6 @@ module Docker.Types (
2929 , Image(..)
3030 , dropImagePrefix
3131 , CreateOpts(..)
32− , cResources
33− , hConfig
3432 , defaultCreateOpts
3533 , DetachKeys(..)
3634 , StartOpts(..)
@@ -64,13 +62,16 @@ module Docker.Types (
6462 , Isolation(..)
6563 , UTSMode(..)
6664 , HostConfig(..)
65+ , defaultHostConfig
6766 , Ulimit(..)
6867 , ContainerResources(..)
68+ , defaultContainerResources
6969 , Port
7070 , Name
7171 , Value
7272 , EnvVar(..)
7373 , ContainerConfig(..)
74+ , defaultContainerConfig
7475 , ExposedPorts(..)
7576 ) where
7677
@@ -529,8 +530,8 @@ instance ToJSON CreateOpts where
529530 JSON.Object $ HM.insert "HostConfig" hcJSON o
530531 _ -> error "ContainerConfig is not an object." -- This should never happen.
531532
532−cConfig :: Text -> ContainerConfig
533−cConfig imageName = ContainerConfig {
533+defaultContainerConfig :: Text -> ContainerConfig
534+defaultContainerConfig imageName = ContainerConfig {
534535 hostname=Nothing
535536 , domainname=Nothing
536537 , user=Nothing
@@ -553,8 +554,8 @@ cConfig imageName = ContainerConfig {
553554 , stopSignal=SIGTERM
554555 }
555556
556−hConfig :: HostConfig
557−hConfig = HostConfig {
557+defaultHostConfig :: HostConfig
558+defaultHostConfig = HostConfig {
558559 binds=[]
559560 , containerIDFile=Nothing
560561 , logConfig=LogDriverConfig JsonFile Nothing
@@ -577,11 +578,11 @@ hConfig = HostConfig {
577578 , readOnlyRootfs=False
578579 , securityOpt=[]
579580 , shmSize=Nothing
580− , resources=cResources
581+ , resources=defaultContainerResources
581582 }
582583
583−cResources :: ContainerResources
584−cResources = ContainerResources {
584+defaultContainerResources :: ContainerResources
585+defaultContainerResources = ContainerResources {
585586 cpuShares=Nothing
586587 , blkioWeight=Nothing
587588 , blkioWeightDevice=Nothing
@@ -603,7 +604,7 @@ cResources = ContainerResources {
603604
604605
605606defaultCreateOpts :: T.Text -> CreateOpts
606−defaultCreateOpts imageName = CreateOpts { containerConfig = cConfig imageName, hostConfig = hConfig }
607+defaultCreateOpts imageName = CreateOpts { containerConfig = defaultContainerConfig imageName, hostConfig = defaultHostConfig }
607608
608609-- detachKeys – Override the key sequence for detaching a container.
609610-- Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _.