-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | An API client for docker written in Haskell
--   
--   See API documentation below.
@package docker
@version 0.5.1.1

module Docker.Client.Types

-- | List of Docker Engine API endpoints
data Endpoint
VersionEndpoint :: Endpoint
ListContainersEndpoint :: ListOpts -> Endpoint
ListImagesEndpoint :: ListOpts -> Endpoint
CreateContainerEndpoint :: CreateOpts -> (Maybe ContainerName) -> Endpoint
StartContainerEndpoint :: StartOpts -> ContainerID -> Endpoint
StopContainerEndpoint :: Timeout -> ContainerID -> Endpoint
WaitContainerEndpoint :: ContainerID -> Endpoint
KillContainerEndpoint :: Signal -> ContainerID -> Endpoint
RestartContainerEndpoint :: Timeout -> ContainerID -> Endpoint
PauseContainerEndpoint :: ContainerID -> Endpoint
UnpauseContainerEndpoint :: ContainerID -> Endpoint

-- | Second argument (Bool) is whether to follow which is currently
--   hardcoded to False. See note in <a>getContainerLogs</a> for
--   explanation why.
ContainerLogsEndpoint :: LogOpts -> Bool -> ContainerID -> Endpoint
DeleteContainerEndpoint :: DeleteOpts -> ContainerID -> Endpoint
InspectContainerEndpoint :: ContainerID -> Endpoint
BuildImageEndpoint :: BuildOpts -> FilePath -> Endpoint

-- | Either pull an image from docker hub or imports an image from a
--   tarball (or URL)
CreateImageEndpoint :: Text -> Tag -> (Maybe Text) -> Endpoint

-- | We should newtype this
type URL = Text

-- | We should newtype this
type ApiVersion = Text

-- | ID of a contianer
data ContainerID

-- | Used for extracting the id of the container from the newtype
fromContainerID :: ContainerID -> Text

-- | Used for parsing a Text value into a ContainerID. We apply some basic
--   validation here.
toContainerID :: Text -> Maybe ContainerID
data ImageID

-- | Used for extracting the id of the image from the newtype.
fromImageID :: ImageID -> Text

-- | Helper function used for parsing a Text value into an ImageID. For now
--   just basic validation is used.
toImageID :: Text -> Maybe ImageID

-- | Timeout used for stopping a container. DefaultTimeout is 10 seconds.
data Timeout
Timeout :: Integer -> Timeout
DefaultTimeout :: Timeout
data StatusCode
StatusCode :: Int -> StatusCode

-- | Signal used for sending to the process running in the container. The
--   default signal is SIGTERM.
data Signal
SIGHUP :: Signal
SIGINT :: Signal
SIGQUIT :: Signal
SIGSTOP :: Signal
SIGTERM :: Signal
SIGUSR1 :: Signal
SIG :: Integer -> Signal
SIGKILL :: Signal
data ContainerDetails
ContainerDetails :: Text -> [Text] -> ContainerConfig -> UTCTime -> Text -> HostConfig -> FilePath -> FilePath -> FilePath -> ContainerID -> ImageID -> Text -> Text -> NetworkSettings -> FilePath -> Text -> FilePath -> Int -> ContainerState -> [Mount] -> ContainerDetails
[appArmorProfile] :: ContainerDetails -> Text
[args] :: ContainerDetails -> [Text]
[containerDetailsConfig] :: ContainerDetails -> ContainerConfig
[created] :: ContainerDetails -> UTCTime
[driver] :: ContainerDetails -> Text
[containerDetailsHostConfig] :: ContainerDetails -> HostConfig
[hostnamePath] :: ContainerDetails -> FilePath
[hostsPath] :: ContainerDetails -> FilePath
[logPath] :: ContainerDetails -> FilePath
[containerDetailsId] :: ContainerDetails -> ContainerID
[containerDetailsImage] :: ContainerDetails -> ImageID
[mountLabel] :: ContainerDetails -> Text
[name] :: ContainerDetails -> Text
[networkSettings] :: ContainerDetails -> NetworkSettings
[path] :: ContainerDetails -> FilePath
[processLabel] :: ContainerDetails -> Text
[resolveConfPath] :: ContainerDetails -> FilePath
[restartCount] :: ContainerDetails -> Int
[containerDetailsState] :: ContainerDetails -> ContainerState
[mounts] :: ContainerDetails -> [Mount]

-- | Client options used to configure the remote engine we're talking to
data DockerClientOpts
DockerClientOpts :: ApiVersion -> URL -> DockerClientOpts
[apiVer] :: DockerClientOpts -> ApiVersion
[baseUrl] :: DockerClientOpts -> URL

-- | Default <a>DockerClientOpts</a> used for talking to the docker engine.
defaultClientOpts :: DockerClientOpts

-- | List options used for filtering the list of container or images.
data ListOpts
ListOpts :: Bool -> ListOpts
[all] :: ListOpts -> Bool

-- | Default <a>ListOpts</a>. Doesn't list stopped containers.
defaultListOpts :: ListOpts

-- | Data type used for represneting the version of the docker engine
--   remote API.
data DockerVersion
DockerVersion :: Text -> ApiVersion -> Text -> Text -> Text -> Text -> Text -> Text -> DockerVersion
[version] :: DockerVersion -> Text
[apiVersion] :: DockerVersion -> ApiVersion
[gitCommit] :: DockerVersion -> Text
[goVersion] :: DockerVersion -> Text
[os] :: DockerVersion -> Text
[arch] :: DockerVersion -> Text
[kernelVersion] :: DockerVersion -> Text
[buildTime] :: DockerVersion -> Text

-- | Data type used for representing the information of various ports that
--   a contianer may expose.
data ContainerPortInfo
ContainerPortInfo :: Maybe Text -> Port -> Maybe Port -> Maybe PortType -> ContainerPortInfo
[ipAddressInfo] :: ContainerPortInfo -> Maybe Text
[privatePortInfo] :: ContainerPortInfo -> Port
[publicPortInfo] :: ContainerPortInfo -> Maybe Port
[portTypeInfo] :: ContainerPortInfo -> Maybe PortType

-- | Data type used for parsing a list of containers.
data Container
Container :: ContainerID -> [Text] -> Text -> ImageID -> Text -> Int -> State -> Maybe Text -> [ContainerPortInfo] -> [Label] -> [Network] -> [Mount] -> Container
[containerId] :: Container -> ContainerID
[containerNames] :: Container -> [Text]
[containerImageName] :: Container -> Text
[containerImageId] :: Container -> ImageID
[containerCommand] :: Container -> Text
[containerCreatedAt] :: Container -> Int
[containerState] :: Container -> State
[containerStatus] :: Container -> Maybe Text
[containerPorts] :: Container -> [ContainerPortInfo]
[containerLabels] :: Container -> [Label]
[containerNetworks] :: Container -> [Network]
[containerMounts] :: Container -> [Mount]

-- | Data type used for parsing the container state from a list of
--   containers.
data ContainerState
ContainerState :: Text -> Int -> Maybe UTCTime -> Bool -> Bool -> Bool -> Int -> Bool -> Bool -> UTCTime -> State -> ContainerState
[containerError] :: ContainerState -> Text
[exitCode] :: ContainerState -> Int
[finishedAt] :: ContainerState -> Maybe UTCTime
[oomKilled] :: ContainerState -> Bool
[dead] :: ContainerState -> Bool
[paused] :: ContainerState -> Bool
[pid] :: ContainerState -> Int
[restarting] :: ContainerState -> Bool
[running] :: ContainerState -> Bool
[startedAt] :: ContainerState -> UTCTime
[state] :: ContainerState -> State

-- | Represents the state of the container life cycle.
data State
Created :: State
Restarting :: State
Running :: State
Paused :: State
Exited :: State
Dead :: State

-- | Alias for representing a RepoDigest. We could newtype this and add
--   some validation.
type Digest = Text

-- | Container and Image Labels.
data Label
Label :: Name -> Value -> Label

-- | Alias for Tags.
type Tag = Text

-- | Data type used for parsing information from a list of images.
data Image
DockerImage :: ImageID -> Integer -> Maybe ImageID -> [Tag] -> [Digest] -> Integer -> Integer -> [Label] -> Image
[imageId] :: Image -> ImageID
[imageCreated] :: Image -> Integer
[imageParentId] :: Image -> Maybe ImageID
[imageRepoTags] :: Image -> [Tag]
[imageRepoDigests] :: Image -> [Digest]
[imageSize] :: Image -> Integer
[imageVirtualSize] :: Image -> Integer
[imageLabels] :: Image -> [Label]
data Entrypoint
Entrypoint :: [Text] -> Entrypoint

-- | Helper function used for dropping the "image" prefix when serializing
--   the Image data type to and from json.
dropImagePrefix :: [a] -> [a]

-- | Options used for creating a Container.
data CreateOpts
CreateOpts :: ContainerConfig -> HostConfig -> CreateOpts
[containerConfig] :: CreateOpts -> ContainerConfig
[hostConfig] :: CreateOpts -> HostConfig

-- | Options for when building images from a Dockerfile
data BuildOpts
BuildOpts :: Text -> Text -> Bool -> Bool -> Bool -> Bool -> Bool -> BuildOpts

-- | Image name in the form of name:tag; ie. myimage:latest.:w
[buildImageName] :: BuildOpts -> Text

-- | Name of dockerfile (default: Dockerfile)
[buildDockerfileName] :: BuildOpts -> Text
[buildQuiet] :: BuildOpts -> Bool

-- | Do not use cache when building the image.
[buildNoCache] :: BuildOpts -> Bool

-- | Remove intermediate containers after a successful build (default
--   true).
[buildRemoveItermediate] :: BuildOpts -> Bool

-- | Always remove intermediate containers.
[buildForceRemoveIntermediate] :: BuildOpts -> Bool

-- | Always attempt to pull a newer version of the *parent* image (ie. FROM
--   debian:jessie).
[buildPullParent] :: BuildOpts -> Bool
defaultBuildOpts :: Text -> BuildOpts

-- | Default create options when creating a container. You only need to
--   specify an image name and the rest is all sensible defaults.
defaultCreateOpts :: Text -> CreateOpts

-- | Override the key sequence for detaching a container. Format is a
--   single character [a-Z] or ctrl-<a>value</a> where <a>value</a> is one
--   of: a-z, @, ^, [, , or _.
data DetachKeys
WithCtrl :: Char -> DetachKeys
WithoutCtrl :: Char -> DetachKeys
DefaultDetachKey :: DetachKeys

-- | Options for starting a container.
data StartOpts
StartOpts :: DetachKeys -> StartOpts
[detachKeys] :: StartOpts -> DetachKeys

-- | Default options for staring a container.
defaultStartOpts :: StartOpts

-- | Options for deleting a container.
data DeleteOpts
DeleteOpts :: Bool -> Bool -> DeleteOpts

-- | Automatically cleanup volumes that the container created as well.
[deleteVolumes] :: DeleteOpts -> Bool

-- | If the container is still running force deletion anyway.
[force] :: DeleteOpts -> Bool

-- | Default options for deleting a container. Most of the time we DON'T
--   want to delete the container's volumes or force delete it if it's
--   running.
defaultDeleteOpts :: DeleteOpts

-- | Timestamp alias.
type Timestamp = Integer

-- | Used for requesting N number of lines when tailing a containers log
--   output.
data TailLogOpt
Tail :: Integer -> TailLogOpt
All :: TailLogOpt

-- | Log options used when requesting the log output from a container.
data LogOpts
LogOpts :: Bool -> Bool -> Maybe Timestamp -> Bool -> TailLogOpt -> LogOpts
[stdout] :: LogOpts -> Bool
[stderr] :: LogOpts -> Bool
[since] :: LogOpts -> Maybe Timestamp
[timestamps] :: LogOpts -> Bool
[tail] :: LogOpts -> TailLogOpt

-- | Sensible default for log options.
defaultLogOpts :: LogOpts

-- | Set permissions on volumes that you mount in the container.
data VolumePermission
ReadWrite :: VolumePermission
ReadOnly :: VolumePermission
data Bind
Bind :: Text -> Text -> Maybe VolumePermission -> Bind
[hostSrc] :: Bind -> Text
[containerDest] :: Bind -> Text
[volumePermission] :: Bind -> Maybe VolumePermission

-- | Used for marking a directory in the container as "exposed" hence
--   taking it outside of the COW filesystem and making it mountable in
--   other containers using <a>VolumesFrom</a>. The volume usually get's
--   created somewhere in <tt><i>var</i>lib<i>docker</i>volumes</tt>
--   (depending on the volume driver used). The CLI example is:
--   
--   <pre>
--   docker run --name app -v /opt/data -it myapp:latest
--   docker run --name app2 --volumes-from app /bin/bash -c "ls -l /opt/data"
--   </pre>
newtype Volume
Volume :: FilePath -> Volume
data Device
Device :: FilePath -> FilePath -> Text -> Device
[pathOnHost] :: Device -> FilePath
[pathInContainer] :: Device -> FilePath
[cgroupPermissions] :: Device -> Text
type ContainerName = Text
data VolumeFrom
VolumeFrom :: ContainerName -> (Maybe VolumePermission) -> VolumeFrom
data Link
Link :: Text -> (Maybe Text) -> Link
data LogDriverType
JsonFile :: LogDriverType
Syslog :: LogDriverType
Journald :: LogDriverType
Gelf :: LogDriverType
Fluentd :: LogDriverType
AwsLogs :: LogDriverType
Splunk :: LogDriverType
Etwlogs :: LogDriverType
LoggingDisabled :: LogDriverType
data LogDriverOption
LogDriverOption :: Name -> Value -> LogDriverOption
data LogDriverConfig
LogDriverConfig :: LogDriverType -> [LogDriverOption] -> LogDriverConfig
data NetworkMode
NetworkBridge :: NetworkMode
NetworkHost :: NetworkMode
NetworkDisabled :: NetworkMode
NetworkNamed :: Text -> NetworkMode
data PortType
TCP :: PortType
UDP :: PortType
data Network
Network :: NetworkMode -> NetworkOptions -> Network

-- | Data type reprsenting the various network settings a container can
--   have.
data NetworkSettings
NetworkSettings :: Text -> Text -> Bool -> Text -> Int -> [PortBinding] -> Text -> Maybe [Text] -> Maybe [Text] -> Text -> Text -> Text -> Int -> Text -> Int -> Text -> Text -> [Network] -> NetworkSettings
[networkSettingsBridge] :: NetworkSettings -> Text
[networkSettingsSandboxId] :: NetworkSettings -> Text
[networkSettingsHairpinMode] :: NetworkSettings -> Bool
[networkSettingsLinkLocalIPv6Address] :: NetworkSettings -> Text
[networkSettingsLinkLocalIPv6PrefixLen] :: NetworkSettings -> Int
[networkSettingsPorts] :: NetworkSettings -> [PortBinding]
[networkSettingsSandboxKey] :: NetworkSettings -> Text
[networkSettingsSecondaryIPAddresses] :: NetworkSettings -> Maybe [Text]
[networkSettingsSecondaryIPv6Addresses] :: NetworkSettings -> Maybe [Text]
[networkSettingsEndpointID] :: NetworkSettings -> Text
[networkSettingsGateway] :: NetworkSettings -> Text
[networkSettingsGlobalIPv6Address] :: NetworkSettings -> Text
[networkSettingsGlobalIPv6PrefixLen] :: NetworkSettings -> Int
[networkSettingsIpAddress] :: NetworkSettings -> Text
[networkSettingsIpPrefixLen] :: NetworkSettings -> Int
[networkSettingsIpv6Gateway] :: NetworkSettings -> Text
[networkSettingsMacAddress] :: NetworkSettings -> Text
[networkSettingsNetworks] :: NetworkSettings -> [Network]

-- | Data type used for parsing the network information of each container
--   when listing them.
data NetworkOptions
NetworkOptions :: Text -> Text -> Text -> Text -> Int -> Maybe Text -> Maybe Text -> Maybe Int -> Text -> NetworkOptions
[networkOptionsId] :: NetworkOptions -> Text
[networkOptionsEndpointId] :: NetworkOptions -> Text
[networkOptionsGateway] :: NetworkOptions -> Text
[networkOptionsIpAddress] :: NetworkOptions -> Text
[networkOptionsIpPrefixLen] :: NetworkOptions -> Int
[networkOptionsIpV6Gateway] :: NetworkOptions -> Maybe Text
[networkOptionsGlobalIPv6Address] :: NetworkOptions -> Maybe Text
[networkOptionsGlobalIPv6PrefixLen] :: NetworkOptions -> Maybe Int
[networkOptionsMacAddress] :: NetworkOptions -> Text

-- | Data type used for parsing the mount information from a container
--   list.
data Mount
Mount :: Maybe Text -> FilePath -> FilePath -> Maybe Text -> Bool -> Text -> Mount
[mountName] :: Mount -> Maybe Text
[mountSource] :: Mount -> FilePath
[mountDestination] :: Mount -> FilePath
[mountDriver] :: Mount -> Maybe Text
[mountRW] :: Mount -> Bool
[mountPropogation] :: Mount -> Text

-- | This datastructure models mapping a Port from the container onto the
--   host system s that the service running in the container can be
--   accessed from the outside world. We either map a port onto all
--   interfaces (default) or onto a specific interface like `127.0.0.1`.
--   <b>NOTE</b>: We should disallow duplicate port bindings as the ToJSON
--   instance will only send the last one. { <a>port</a>/<a>protocol</a>:
--   [{ <a>HostPort</a>: "<a>port</a>" }] }
data PortBinding
PortBinding :: Port -> PortType -> [HostPort] -> PortBinding
[containerPort] :: PortBinding -> Port
[portType] :: PortBinding -> PortType
[hostPorts] :: PortBinding -> [HostPort]
data HostPort
HostPort :: Text -> Port -> HostPort
[hostIp] :: HostPort -> Text
[hostPost] :: HostPort -> Port
type RetryCount = Integer
data RestartPolicy
RestartAlways :: RestartPolicy
RestartUnlessStopped :: RestartPolicy
RestartOnFailure :: RetryCount -> RestartPolicy
RestartOff :: RestartPolicy
data Isolation
Default :: Isolation
Process :: Isolation
Hyperv :: Isolation
newtype UTSMode
UTSMode :: Text -> UTSMode
data HostConfig
HostConfig :: [Bind] -> Maybe FilePath -> LogDriverConfig -> NetworkMode -> [PortBinding] -> RestartPolicy -> Maybe Text -> [VolumeFrom] -> [Text] -> [Text] -> [Text] -> [Text] -> [Text] -> [Text] -> Maybe Text -> [Link] -> Maybe Integer -> Bool -> Bool -> Bool -> [Text] -> Maybe Integer -> ContainerResources -> HostConfig
[binds] :: HostConfig -> [Bind]
[containerIDFile] :: HostConfig -> Maybe FilePath
[logConfig] :: HostConfig -> LogDriverConfig
[networkMode] :: HostConfig -> NetworkMode
[portBindings] :: HostConfig -> [PortBinding]
[restartPolicy] :: HostConfig -> RestartPolicy
[volumeDriver] :: HostConfig -> Maybe Text
[volumesFrom] :: HostConfig -> [VolumeFrom]
[capAdd] :: HostConfig -> [Text]
[capDrop] :: HostConfig -> [Text]
[dns] :: HostConfig -> [Text]
[dnsOptions] :: HostConfig -> [Text]
[dnsSearch] :: HostConfig -> [Text]
[extraHosts] :: HostConfig -> [Text]
[ipcMode] :: HostConfig -> Maybe Text
[links] :: HostConfig -> [Link]
[oomScoreAdj] :: HostConfig -> Maybe Integer
[privileged] :: HostConfig -> Bool
[publishAllPorts] :: HostConfig -> Bool
[readonlyRootfs] :: HostConfig -> Bool
[securityOpt] :: HostConfig -> [Text]
[shmSize] :: HostConfig -> Maybe Integer
[resources] :: HostConfig -> ContainerResources

-- | Default host confiratuon used for creating a container.
defaultHostConfig :: HostConfig
data Ulimit
Ulimit :: Text -> Integer -> Integer -> Ulimit
[ulimitName] :: Ulimit -> Text
[ulimitSoft] :: Ulimit -> Integer
[ulimitHard] :: Ulimit -> Integer
data ContainerResources
ContainerResources :: Maybe Integer -> Maybe Integer -> Maybe [DeviceWeight] -> Maybe [DeviceRate] -> Maybe [DeviceRate] -> Maybe [DeviceRate] -> Maybe [DeviceRate] -> Maybe Integer -> Maybe Text -> Maybe Text -> [Device] -> Maybe MemoryConstraint -> Maybe MemoryConstraint -> Maybe MemoryConstraint -> Maybe MemoryConstraint -> Maybe Bool -> [Ulimit] -> ContainerResources
[cpuShares] :: ContainerResources -> Maybe Integer
[blkioWeight] :: ContainerResources -> Maybe Integer
[blkioWeightDevice] :: ContainerResources -> Maybe [DeviceWeight]
[blkioDeviceReadBps] :: ContainerResources -> Maybe [DeviceRate]
[blkioDeviceWriteBps] :: ContainerResources -> Maybe [DeviceRate]
[blkioDeviceReadIOps] :: ContainerResources -> Maybe [DeviceRate]
[blkioDeviceWriteIOps] :: ContainerResources -> Maybe [DeviceRate]
[cpuPeriod] :: ContainerResources -> Maybe Integer
[cpusetCpus] :: ContainerResources -> Maybe Text
[cpusetMems] :: ContainerResources -> Maybe Text
[devices] :: ContainerResources -> [Device]
[kernelMemory] :: ContainerResources -> Maybe MemoryConstraint
[memory] :: ContainerResources -> Maybe MemoryConstraint
[memoryReservation] :: ContainerResources -> Maybe MemoryConstraint
[memorySwap] :: ContainerResources -> Maybe MemoryConstraint
[oomKillDisable] :: ContainerResources -> Maybe Bool
[ulimits] :: ContainerResources -> [Ulimit]
defaultContainerResources :: ContainerResources
type Port = Integer
type Name = Text
type Value = Text
data EnvVar
EnvVar :: Name -> Value -> EnvVar
data ContainerConfig
ContainerConfig :: Maybe Text -> Maybe Text -> Maybe Text -> Bool -> Bool -> Bool -> [ExposedPort] -> Bool -> Bool -> Bool -> [EnvVar] -> [Text] -> Text -> [Volume] -> Maybe FilePath -> Entrypoint -> Maybe Bool -> Maybe Text -> [Label] -> Signal -> ContainerConfig
[hostname] :: ContainerConfig -> Maybe Text
[domainname] :: ContainerConfig -> Maybe Text
[user] :: ContainerConfig -> Maybe Text
[attachStdin] :: ContainerConfig -> Bool
[attachStdout] :: ContainerConfig -> Bool
[attachStderr] :: ContainerConfig -> Bool
[exposedPorts] :: ContainerConfig -> [ExposedPort]
[tty] :: ContainerConfig -> Bool
[openStdin] :: ContainerConfig -> Bool
[stdinOnce] :: ContainerConfig -> Bool
[env] :: ContainerConfig -> [EnvVar]
[cmd] :: ContainerConfig -> [Text]
[image] :: ContainerConfig -> Text
[volumes] :: ContainerConfig -> [Volume]
[workingDir] :: ContainerConfig -> Maybe FilePath
[entrypoint] :: ContainerConfig -> Entrypoint
[networkDisabled] :: ContainerConfig -> Maybe Bool
[macAddress] :: ContainerConfig -> Maybe Text
[labels] :: ContainerConfig -> [Label]
[stopSignal] :: ContainerConfig -> Signal

-- | Container configuration used for creating a container with sensible
--   defaults.
defaultContainerConfig :: Text -> ContainerConfig

-- | ExposedPort represents a port (and it's type) that a container should
--   expose to other containers or the host system. <tt>NOTE</tt>: This
--   does not automatically expose the port onto the host system but rather
--   it just tags it. It's best to be used with the PublishAllPorts flag.
--   It is also useful for the daemon to know which Environment variables
--   to inject into a container linking to our container. Example linking a
--   Postgres container named db would inject the following environment
--   variables automatically if we set the corresponding
--   
--   ExposedPort:
--   
--   <pre>
--   DB_PORT_5432_TCP_PORT="5432"
--   DB_PORT_5432_TCP_PROTO="tcp"
--   DB_PORT_5432_TCP="tcp://172.17.0.1:5432"
--   </pre>
data ExposedPort
ExposedPort :: Port -> PortType -> ExposedPort
data DeviceWeight
DeviceWeight :: FilePath -> Text -> DeviceWeight
[deviceWeightPath] :: DeviceWeight -> FilePath
[deviceWeightWeight] :: DeviceWeight -> Text
data DeviceRate
DeviceRate :: FilePath -> Text -> DeviceRate
[deviceRatePath] :: DeviceRate -> FilePath
[deviceRateRate] :: DeviceRate -> Text

-- | A convenience function that adds PortBindings to and exiting
--   <a>CreateOpts</a> record. Useful with <a>defaultCreateOpts</a>
--   Example:
--   
--   <pre>
--   &gt;&gt;&gt; let pb = PortBinding 80 TCP [HostPort "0.0.0.0" 8000]
--   
--   &gt;&gt;&gt; addPortBinding pb $ defaultCreateOpts "nginx:latest"
--   </pre>
addPortBinding :: PortBinding -> CreateOpts -> CreateOpts

-- | Helper function for adding a <a>ExposedPort</a> to and existing
--   CreateOpts record.
addExposedPort :: ExposedPort -> CreateOpts -> CreateOpts

-- | A helper function to more easily add a bind mount to existing
--   <a>CreateOpts</a> records.
addBind :: Bind -> CreateOpts -> CreateOpts

-- | Helper function for adding a Command to and existing CreateOpts
--   record.
setCmd :: Text -> CreateOpts -> CreateOpts

-- | Helper function for adding a <a>Link</a> to and existing CreateOpts
--   record.
addLink :: Link -> CreateOpts -> CreateOpts

-- | Helper function for adding a <a>Volume</a> to and existing CreateOpts
--   record.
addVolume :: Volume -> CreateOpts -> CreateOpts

-- | Helper function for adding a <a>VolumeFrom</a> to and existing
--   CreateOpts record.
addVolumeFrom :: VolumeFrom -> CreateOpts -> CreateOpts
data MemoryConstraint
MemoryConstraint :: Integer -> MemoryConstraintSize -> MemoryConstraint
data MemoryConstraintSize
B :: MemoryConstraintSize
MB :: MemoryConstraintSize
GB :: MemoryConstraintSize
instance GHC.Generics.Generic Docker.Client.Types.ContainerDetails
instance GHC.Show.Show Docker.Client.Types.ContainerDetails
instance GHC.Classes.Eq Docker.Client.Types.ContainerDetails
instance GHC.Show.Show Docker.Client.Types.Endpoint
instance GHC.Classes.Eq Docker.Client.Types.Endpoint
instance GHC.Show.Show Docker.Client.Types.CreateOpts
instance GHC.Classes.Eq Docker.Client.Types.CreateOpts
instance GHC.Generics.Generic Docker.Client.Types.ContainerConfig
instance GHC.Show.Show Docker.Client.Types.ContainerConfig
instance GHC.Classes.Eq Docker.Client.Types.ContainerConfig
instance GHC.Generics.Generic Docker.Client.Types.Entrypoint
instance GHC.Show.Show Docker.Client.Types.Entrypoint
instance GHC.Classes.Eq Docker.Client.Types.Entrypoint
instance GHC.Show.Show Docker.Client.Types.ExposedPort
instance GHC.Classes.Eq Docker.Client.Types.ExposedPort
instance GHC.Show.Show Docker.Client.Types.EnvVar
instance GHC.Classes.Eq Docker.Client.Types.EnvVar
instance GHC.Classes.Eq Docker.Client.Types.Container
instance GHC.Show.Show Docker.Client.Types.Container
instance GHC.Generics.Generic Docker.Client.Types.Image
instance GHC.Classes.Eq Docker.Client.Types.Image
instance GHC.Show.Show Docker.Client.Types.Image
instance GHC.Show.Show Docker.Client.Types.Label
instance GHC.Classes.Eq Docker.Client.Types.Label
instance GHC.Generics.Generic Docker.Client.Types.HostConfig
instance GHC.Show.Show Docker.Client.Types.HostConfig
instance GHC.Classes.Eq Docker.Client.Types.HostConfig
instance GHC.Show.Show Docker.Client.Types.LogDriverConfig
instance GHC.Classes.Eq Docker.Client.Types.LogDriverConfig
instance GHC.Show.Show Docker.Client.Types.LogDriverOption
instance GHC.Classes.Eq Docker.Client.Types.LogDriverOption
instance GHC.Show.Show Docker.Client.Types.ContainerPortInfo
instance GHC.Classes.Eq Docker.Client.Types.ContainerPortInfo
instance GHC.Show.Show Docker.Client.Types.NetworkSettings
instance GHC.Classes.Eq Docker.Client.Types.NetworkSettings
instance GHC.Show.Show Docker.Client.Types.PortBinding
instance GHC.Classes.Eq Docker.Client.Types.PortBinding
instance GHC.Show.Show Docker.Client.Types.HostPort
instance GHC.Classes.Eq Docker.Client.Types.HostPort
instance GHC.Generics.Generic Docker.Client.Types.ContainerResources
instance GHC.Show.Show Docker.Client.Types.ContainerResources
instance GHC.Classes.Eq Docker.Client.Types.ContainerResources
instance GHC.Show.Show Docker.Client.Types.MemoryConstraint
instance GHC.Classes.Eq Docker.Client.Types.MemoryConstraint
instance GHC.Show.Show Docker.Client.Types.MemoryConstraintSize
instance GHC.Classes.Eq Docker.Client.Types.MemoryConstraintSize
instance GHC.Classes.Eq Docker.Client.Types.DeviceRate
instance GHC.Show.Show Docker.Client.Types.DeviceRate
instance GHC.Classes.Eq Docker.Client.Types.DeviceWeight
instance GHC.Show.Show Docker.Client.Types.DeviceWeight
instance GHC.Generics.Generic Docker.Client.Types.Ulimit
instance GHC.Show.Show Docker.Client.Types.Ulimit
instance GHC.Classes.Eq Docker.Client.Types.Ulimit
instance GHC.Show.Show Docker.Client.Types.UTSMode
instance GHC.Classes.Eq Docker.Client.Types.UTSMode
instance GHC.Show.Show Docker.Client.Types.Isolation
instance GHC.Classes.Eq Docker.Client.Types.Isolation
instance GHC.Show.Show Docker.Client.Types.RestartPolicy
instance GHC.Classes.Eq Docker.Client.Types.RestartPolicy
instance GHC.Classes.Ord Docker.Client.Types.PortType
instance GHC.Read.Read Docker.Client.Types.PortType
instance GHC.Generics.Generic Docker.Client.Types.PortType
instance GHC.Classes.Eq Docker.Client.Types.PortType
instance GHC.Show.Show Docker.Client.Types.Network
instance GHC.Classes.Eq Docker.Client.Types.Network
instance GHC.Classes.Ord Docker.Client.Types.NetworkMode
instance GHC.Show.Show Docker.Client.Types.NetworkMode
instance GHC.Classes.Eq Docker.Client.Types.NetworkMode
instance GHC.Show.Show Docker.Client.Types.LogDriverType
instance GHC.Classes.Eq Docker.Client.Types.LogDriverType
instance GHC.Show.Show Docker.Client.Types.Link
instance GHC.Classes.Eq Docker.Client.Types.Link
instance GHC.Show.Show Docker.Client.Types.VolumeFrom
instance GHC.Classes.Eq Docker.Client.Types.VolumeFrom
instance GHC.Generics.Generic Docker.Client.Types.Device
instance GHC.Show.Show Docker.Client.Types.Device
instance GHC.Classes.Eq Docker.Client.Types.Device
instance GHC.Show.Show Docker.Client.Types.Bind
instance GHC.Classes.Eq Docker.Client.Types.Bind
instance GHC.Show.Show Docker.Client.Types.Volume
instance GHC.Classes.Eq Docker.Client.Types.Volume
instance GHC.Generics.Generic Docker.Client.Types.VolumePermission
instance GHC.Show.Show Docker.Client.Types.VolumePermission
instance GHC.Classes.Eq Docker.Client.Types.VolumePermission
instance GHC.Show.Show Docker.Client.Types.LogOpts
instance GHC.Classes.Eq Docker.Client.Types.LogOpts
instance GHC.Show.Show Docker.Client.Types.TailLogOpt
instance GHC.Classes.Eq Docker.Client.Types.TailLogOpt
instance GHC.Show.Show Docker.Client.Types.BuildOpts
instance GHC.Classes.Eq Docker.Client.Types.BuildOpts
instance GHC.Show.Show Docker.Client.Types.DeleteOpts
instance GHC.Classes.Eq Docker.Client.Types.DeleteOpts
instance GHC.Show.Show Docker.Client.Types.StartOpts
instance GHC.Classes.Eq Docker.Client.Types.StartOpts
instance GHC.Show.Show Docker.Client.Types.DetachKeys
instance GHC.Classes.Eq Docker.Client.Types.DetachKeys
instance GHC.Generics.Generic Docker.Client.Types.ContainerState
instance GHC.Show.Show Docker.Client.Types.ContainerState
instance GHC.Classes.Eq Docker.Client.Types.ContainerState
instance GHC.Generics.Generic Docker.Client.Types.State
instance GHC.Show.Show Docker.Client.Types.State
instance GHC.Classes.Eq Docker.Client.Types.State
instance GHC.Show.Show Docker.Client.Types.NetworkOptions
instance GHC.Classes.Eq Docker.Client.Types.NetworkOptions
instance GHC.Generics.Generic Docker.Client.Types.DockerVersion
instance GHC.Classes.Eq Docker.Client.Types.DockerVersion
instance GHC.Show.Show Docker.Client.Types.DockerVersion
instance GHC.Show.Show Docker.Client.Types.ListOpts
instance GHC.Classes.Eq Docker.Client.Types.ListOpts
instance GHC.Show.Show Docker.Client.Types.DockerClientOpts
instance GHC.Classes.Eq Docker.Client.Types.DockerClientOpts
instance GHC.Generics.Generic Docker.Client.Types.Mount
instance GHC.Show.Show Docker.Client.Types.Mount
instance GHC.Classes.Eq Docker.Client.Types.Mount
instance GHC.Show.Show Docker.Client.Types.Signal
instance GHC.Classes.Eq Docker.Client.Types.Signal
instance GHC.Show.Show Docker.Client.Types.Timeout
instance GHC.Classes.Eq Docker.Client.Types.Timeout
instance GHC.Show.Show Docker.Client.Types.ImageID
instance GHC.Classes.Eq Docker.Client.Types.ImageID
instance GHC.Show.Show Docker.Client.Types.ContainerID
instance GHC.Classes.Eq Docker.Client.Types.ContainerID
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ContainerDetails
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.CreateOpts
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.ContainerConfig
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ContainerConfig
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.Entrypoint
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Entrypoint
instance Data.Aeson.Types.FromJSON.FromJSON [Docker.Client.Types.ExposedPort]
instance Data.Aeson.Types.ToJSON.ToJSON [Docker.Client.Types.ExposedPort]
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.EnvVar
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.EnvVar
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Container
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Image
instance Data.Aeson.Types.ToJSON.ToJSON [Docker.Client.Types.Label]
instance Data.Aeson.Types.FromJSON.FromJSON [Docker.Client.Types.Label]
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.HostConfig
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.HostConfig
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.LogDriverConfig
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.LogDriverConfig
instance Data.Aeson.Types.ToJSON.ToJSON [Docker.Client.Types.LogDriverOption]
instance Data.Aeson.Types.FromJSON.FromJSON [Docker.Client.Types.LogDriverOption]
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ContainerPortInfo
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.NetworkSettings
instance Data.Aeson.Types.FromJSON.FromJSON [Docker.Client.Types.PortBinding]
instance Data.Aeson.Types.ToJSON.ToJSON [Docker.Client.Types.PortBinding]
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.HostPort
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.HostPort
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ContainerResources
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.MemoryConstraint
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.MemoryConstraint
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.DeviceRate
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.DeviceRate
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.DeviceWeight
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.DeviceWeight
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Ulimit
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.Ulimit
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.RestartPolicy
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.RestartPolicy
instance GHC.Show.Show Docker.Client.Types.PortType
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.PortType
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.PortType
instance Data.Aeson.Types.FromJSON.FromJSON [Docker.Client.Types.Network]
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.NetworkMode
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.NetworkMode
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.LogDriverType
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.LogDriverType
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Link
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.Link
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.VolumeFrom
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.VolumeFrom
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.Device
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Device
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Bind
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.Bind
instance Data.Aeson.Types.ToJSON.ToJSON [Docker.Client.Types.Volume]
instance Data.Aeson.Types.FromJSON.FromJSON [Docker.Client.Types.Volume]
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.VolumePermission
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.VolumePermission
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ContainerState
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.State
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.NetworkOptions
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.DockerVersion
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.DockerVersion
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Mount
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.Signal
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.Signal
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.StatusCode
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.StatusCode
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.ImageID
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ImageID
instance Data.Aeson.Types.ToJSON.ToJSON Docker.Client.Types.ContainerID
instance Data.Aeson.Types.FromJSON.FromJSON Docker.Client.Types.ContainerID

module Docker.Client.Internal
encodeURL :: [Text] -> Text
encodeURLWithQuery :: [Text] -> Query -> Text
encodeQ :: String -> ByteString
getEndpoint :: ApiVersion -> Endpoint -> Text
getEndpointRequestBody :: Endpoint -> Maybe RequestBody
getEndpointContentType :: Endpoint -> ByteString

module Docker.Client.Http
type Request = Request
type Response = Response ByteString
type HttpVerb = StdMethod
newtype HttpHandler m
HttpHandler :: (forall a. Request -> (Response () -> Sink ByteString m (Either DockerError a)) -> m (Either DockerError a)) -> HttpHandler m
data DockerError
DockerConnectionError :: HttpException -> DockerError
DockerInvalidRequest :: Endpoint -> DockerError
DockerClientError :: Text -> DockerError

-- | Could not parse the response from the Docker endpoint.
DockerClientDecodeError :: Text -> DockerError

-- | Invalid exit code received from Docker endpoint.
DockerInvalidStatusCode :: Status -> DockerError
GenericDockerError :: Text -> DockerError
newtype DockerT m a
DockerT :: Monad m => ReaderT (DockerClientOpts, HttpHandler m) m a -> DockerT m a
[unDockerT] :: DockerT m a -> Monad m => ReaderT (DockerClientOpts, HttpHandler m) m a
runDockerT :: Monad m => (DockerClientOpts, HttpHandler m) -> DockerT m a -> m a
mkHttpRequest :: HttpVerb -> Endpoint -> DockerClientOpts -> Maybe Request
defaultHttpHandler :: (MonadUnliftIO m, MonadIO m, MonadMask m) => m (HttpHandler m)
httpHandler :: (MonadUnliftIO m, MonadIO m, MonadMask m) => Manager -> HttpHandler m

-- | Connect to a unix domain socket (the default docker socket is at
--   /var/run/docker.sock)
--   
--   Docker seems to ignore the hostname in requests sent over unix domain
--   sockets (and the port obviously doesn't matter either)
unixHttpHandler :: (MonadUnliftIO m, MonadIO m, MonadMask m) => FilePath -> m (HttpHandler m)
clientParamsWithClientAuthentication :: HostName -> PortNumber -> FilePath -> FilePath -> IO (Either String ClientParams)
clientParamsSetCA :: ClientParams -> FilePath -> IO ClientParams
statusCodeToError :: Endpoint -> Status -> Maybe DockerError
instance GHC.Base.Functor m => GHC.Base.Functor (Docker.Client.Http.DockerT m)
instance GHC.Show.Show Docker.Client.Http.DockerError
instance GHC.Base.Applicative m => GHC.Base.Applicative (Docker.Client.Http.DockerT m)
instance GHC.Base.Monad m => GHC.Base.Monad (Docker.Client.Http.DockerT m)
instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader (Docker.Client.Types.DockerClientOpts, Docker.Client.Http.HttpHandler m) (Docker.Client.Http.DockerT m)
instance Control.Monad.Trans.Class.MonadTrans Docker.Client.Http.DockerT
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Docker.Client.Http.DockerT m)

module Docker.Client.Utils
type File = FilePath
data DirTree
DirTree :: [File] -> [DirTree] -> DirTree
newtype ExclusionPattern
ExclusionPattern :: Text -> ExclusionPattern
newtype InclusionPattern
InclusionPattern :: Text -> InclusionPattern
data DockerIgnore
DockerIgnore :: [ExclusionPattern] -> [InclusionPattern] -> DockerIgnore
[exclusionPatterns] :: DockerIgnore -> [ExclusionPattern]
[inclusionPatterns] :: DockerIgnore -> [InclusionPattern]
newtype BuildContextRootDir
BuildContextRootDir :: FilePath -> BuildContextRootDir
makeBuildContext :: forall m. MonadIO m => BuildContextRootDir -> m (Either DockerError FilePath)
makeBuildContext' :: forall m. MonadIO m => BuildContextRootDir -> m FilePath
parseDockerIgnoreFile :: Text -> DockerIgnore
getBuildContext :: BuildContextRootDir -> IO [FilePath]
shouldInclude :: DockerIgnore -> FilterPredicate
shouldRecurse :: DockerIgnore -> RecursionPredicate
dockerIgnoreDecision :: (Bool, Bool) -> Bool
exclusionCheck :: FilePath -> [ExclusionPattern] -> Bool
inclusionCheck :: FilePath -> [InclusionPattern] -> Bool
instance GHC.Show.Show Docker.Client.Utils.BuildContextRootDir
instance GHC.Classes.Eq Docker.Client.Utils.BuildContextRootDir
instance GHC.Show.Show Docker.Client.Utils.DockerIgnore
instance GHC.Classes.Eq Docker.Client.Utils.DockerIgnore
instance GHC.Show.Show Docker.Client.Utils.InclusionPattern
instance GHC.Classes.Eq Docker.Client.Utils.InclusionPattern
instance GHC.Show.Show Docker.Client.Utils.ExclusionPattern
instance GHC.Classes.Eq Docker.Client.Utils.ExclusionPattern

module Docker.Client.Api

-- | Lists all running docker containers. Pass in
--   <tt><a>defaultListOpts</a> {all = True}</tt> to get a list of stopped
--   containers as well.
listContainers :: forall m. (MonadIO m, MonadMask m) => ListOpts -> DockerT m (Either DockerError [Container])

-- | Creates a docker container but does <b>not</b> start it. See
--   <a>CreateOpts</a> for a list of options and you can use
--   <a>defaultCreateOpts</a> for some sane defaults.
createContainer :: forall m. (MonadIO m, MonadMask m) => CreateOpts -> Maybe ContainerName -> DockerT m (Either DockerError ContainerID)

-- | Start a container from a given <a>ContainerID</a> that we get from
--   <a>createContainer</a>. See <a>StartOpts</a> for a list of
--   configuration options for starting a container. Use
--   <a>defaultStartOpts</a> for sane defaults.
startContainer :: forall m. (MonadIO m, MonadMask m) => StartOpts -> ContainerID -> DockerT m (Either DockerError ())

-- | Attempts to stop a container with the given <a>ContainerID</a>
--   gracefully (SIGTERM). The docker daemon will wait for the given
--   <a>Timeout</a> and then send a SIGKILL killing the container.
stopContainer :: forall m. (MonadIO m, MonadMask m) => Timeout -> ContainerID -> DockerT m (Either DockerError ())

-- | Blocks until a container with the given <a>ContainerID</a> stops, then
--   returns the exit code
waitContainer :: forall m. (MonadIO m, MonadMask m) => ContainerID -> DockerT m (Either DockerError ExitCode)

-- | Sends a <a>Signal</a> to the container with the given
--   <a>ContainerID</a>. Same as <a>stopContainer</a> but you choose the
--   signal directly.
killContainer :: forall m. (MonadIO m, MonadMask m) => Signal -> ContainerID -> DockerT m (Either DockerError ())

-- | Restarts a container with the given <a>ContainerID</a>.
restartContainer :: forall m. (MonadIO m, MonadMask m) => Timeout -> ContainerID -> DockerT m (Either DockerError ())

-- | Pauses a container with the given <a>ContainerID</a>.
pauseContainer :: forall m. (MonadIO m, MonadMask m) => ContainerID -> DockerT m (Either DockerError ())

-- | Unpauses a container with the given <a>ContainerID</a>.
unpauseContainer :: forall m. (MonadIO m, MonadMask m) => ContainerID -> DockerT m (Either DockerError ())

-- | Deletes a container with the given <a>ContainerID</a>. See
--   <a>DeleteOpts</a> for options and use <a>defaultDeleteOpts</a> for
--   sane defaults.
deleteContainer :: forall m. (MonadIO m, MonadMask m) => DeleteOpts -> ContainerID -> DockerT m (Either DockerError ())

-- | Gets <a>ContainerDetails</a> for a given <a>ContainerID</a>.
inspectContainer :: forall m. (MonadIO m, MonadMask m) => ContainerID -> DockerT m (Either DockerError ContainerDetails)

-- | Get's container's logs for a given <a>ContainerID</a>. This will only
--   work with the <a>JsonFile</a> <a>LogDriverType</a> as the other driver
--   types disable this endpoint and it will return a <a>DockerError</a>.
--   
--   See <a>LogOpts</a> for options that you can pass and
--   <a>defaultLogOpts</a> for sane defaults.
--   
--   <b>NOTE</b>: his function will fetch the entire log that the container
--   produced in the json-file on disk. Depending on the logging setup of
--   the process in your container this can be a significant amount which
--   might block your application...so use with caution.
--   
--   If you want to stream the logs from the container continuosly then use
--   <a>getContainerLogsStream</a>
--   
--   <b>NOTE</b>: It's recommended to use one of the other
--   <a>LogDriverType</a>s available (like syslog) for creating your
--   containers.
getContainerLogs :: forall m. (MonadIO m, MonadMask m) => LogOpts -> ContainerID -> DockerT m (Either DockerError ByteString)

-- | Continuously gets the container's logs as a stream. Uses conduit.
--   
--   <b>Example</b>:
--   
--   <pre>
--   &gt;&gt;&gt; import Docker.Client
--   &gt;&gt;&gt; import Data.Maybe
--   &gt;&gt;&gt; import Conduit
--   &gt;&gt;&gt; h &lt;- defaultHttpHanlder
--   &gt;&gt;&gt; let cid = fromJust $ toContainerID "fee86e1d522b"
--   &gt;&gt;&gt; runDockerT (defaultClientOpts, h) $ getContainerLogsStream defaultLogOpts cid stdoutC
--   </pre>
getContainerLogsStream :: forall m b. (MonadIO m, MonadMask m) => LogOpts -> ContainerID -> Sink ByteString m b -> DockerT m (Either DockerError b)

-- | Lists all docker images.
listImages :: forall m. (MonadIO m, MonadMask m) => ListOpts -> DockerT m (Either DockerError [Image])

-- | Build an Image from a Dockerfile
--   
--   TODO: Add X-Registry-Config
--   
--   TODO: Add support for remote URLs to a Dockerfile
--   
--   TODO: Clean up temp tar.gz file after the image is built
buildImageFromDockerfile :: forall m. (MonadIO m, MonadMask m) => BuildOpts -> FilePath -> DockerT m (Either DockerError ())

-- | Pulls an image from Docker Hub (by default).
--   
--   TODO: Add support for X-Registry-Auth and pulling from private docker
--   registries.
--   
--   TODO: Implement importImage function that uses he same
--   CreateImageEndpoint but rather than pulling from docker hub it imports
--   the image from a tarball or a URL.
pullImage :: forall m b. (MonadIO m, MonadMask m) => Text -> Tag -> Sink ByteString m b -> DockerT m (Either DockerError b)

-- | Gets the version of the docker engine remote API.
getDockerVersion :: forall m. (MonadIO m, MonadMask m) => DockerT m (Either DockerError DockerVersion)


-- | <h1>Getting started</h1>
--   
--   Creating a container:
--   
--   We're going to create a nginx container and we're going to map port
--   <tt>80</tt> from within the container to port <tt>8000</tt> on the
--   host.
--   
--   <pre>
--   import           Docker.Client
--   
--   runNginxContainer :: IO ContainerID
--   runNginxContainer = do
--       h &lt;- defaultHttpHandler
--       runDockerT (defaultClientOpts, h) $ do
--       let pb = PortBinding 80 TCP [HostPort "0.0.0.0" 8000]
--       let myCreateOpts = addPortBinding pb $ defaultCreateOpts "nginx:latest"
--       cid &lt;- createContainer myCreateOpts
--       case cid of
--           Left err -&gt; error $ show err
--           Right i -&gt; do
--               _ &lt;- startContainer defaultStartOpts i
--               return i
--   </pre>
--   
--   Let's start out nginx container:
--   
--   <pre>
--   &gt;&gt;&gt; cid &lt;- runNginxContainer
--   </pre>
--   
--   Visit <a>http://localhost:8000</a> and verify that nginx is running.
--   
--   Let's stop the container now:
--   
--   <pre>
--   stopNginxContainer :: ContainerID -&gt; IO ()
--   stopNginxContainer cid = do
--       h &lt;- defaultHttpHandler
--       runDockerT (defaultClientOpts, h) $ do
--       r &lt;- stopContainer DefaultTimeout cid
--       case r of
--           Left err -&gt; error "I failed to stop the container"
--           Right _ -&gt; return ()
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; stopNginxContainer cid
--   </pre>
--   
--   Let's start a Postgres container by mapping the /tmp directory from
--   within the container to the /tmp directory on the host. That way we
--   make sure that the data we write to /tmp in the container will persist
--   on the host file system.
--   
--   <pre>
--   runPostgresContainer :: IO ContainerID
--   runPostgresContainer = do
--       h &lt;- defaultHttpHandler
--       runDockerT (defaultClientOpts, h) $ do
--       let pb = PortBinding 5432 TCP [HostPort "0.0.0.0" 5432]
--       let myCreateOpts = addBinds [Bind "/tmp" "/tmp" Nothing] $ addPortBinding pb $ defaultCreateOpts "postgres:9.5"
--       cid &lt;- createContainer myCreateOpts
--       case cid of
--           Left err -&gt; error $ show err
--           Right i -&gt; do
--               _ &lt;- startContainer defaultStartOpts i
--               return i
--   </pre>
--   
--   <h1>Get Docker API Version</h1>
--   
--   <pre>
--   &gt;&gt;&gt; h &lt;- defaultHttpHandler
--   
--   &gt;&gt;&gt; runDockerT (defaultClientOpts, h) $ getDockerVersion
--   Right (DockerVersion {version = "1.12.0", apiVersion = "1.24", gitCommit = "8eab29e", goVersion = "go1.6.3", os = "linux", arch = "amd64", kernelVersion = "4.6.0-1-amd64", buildTime = "2016-07-28T21:46:40.664812891+00:00"})
--   </pre>
--   
--   <h1>Setup SSL Authentication</h1>
--   
--   Let's create a custom <a>HttpHandler</a> that uses a client's
--   certificate and private key for SSL authentication. It also accepts a
--   self-signed CA certificate which is specified via
--   <a>clientParamsSetCA</a>. This handler can replace
--   <a>defaultHttpHandler</a> in the arguments to <a>runDockerT</a>.
--   
--   <pre>
--   let host = "domain.name"
--   let port = fromInteger 4000
--   let privKey = "path/to/private/key"
--   let cert = "path/to/certificate"
--   let ca = "path/to/CA"
--   paramsE &lt;- clientParamsWithClientAuthentication host port privKey cert
--   case paramsE of
--       Left err -&gt;
--           error err
--       Right params' -&gt; do
--           params &lt;- clientParamsSetCA params' ca
--           settings &lt;- HTTP.mkManagerSettings (TLSSettings params) Nothing
--           manager &lt;- newManager settings
--           return $ httpHandler manager
--   </pre>
module Docker.Client
