@@ -65,8 +65,8 @@ parseResponse (Right response) =
65getDockerVersion :: forall m. Monad m => DockerT m (Either DockerError DockerVersion)
65getDockerVersion :: forall m. Monad m => DockerT m (Either DockerError DockerVersion)
66getDockerVersion = requestHelper GET VersionEndpoint >>= parseResponse
66getDockerVersion = requestHelper GET VersionEndpoint >>= parseResponse
68−-- | Lists all running docker containers. Pass in 'defaultListOpts' {all
68+-- | Lists all running docker containers. Pass in @'defaultListOpts' {all
69−-- = True} to get a list of stopped containers as well.
69+-- = True}@ to get a list of stopped containers as well.
70listContainers :: forall m. Monad m => ListOpts -> DockerT m (Either DockerError [Container])
70listContainers :: forall m. Monad m => ListOpts -> DockerT m (Either DockerError [Container])
71listContainers opts = requestHelper GET (ListContainersEndpoint opts) >>= parseResponse
71listContainers opts = requestHelper GET (ListContainersEndpoint opts) >>= parseResponse
@@ -74,57 +74,57 @@ listContainers opts = requestHelper GET (ListContainersEndpoint opts) >>= parseR
74listImages :: forall m. Monad m => ListOpts -> DockerT m (Either DockerError [Image])
74listImages :: forall m. Monad m => ListOpts -> DockerT m (Either DockerError [Image])
75listImages opts = requestHelper GET (ListImagesEndpoint opts) >>= parseResponse
75listImages opts = requestHelper GET (ListImagesEndpoint opts) >>= parseResponse
77−-- | Creates a docker container but does *not* start it. See
77+-- | Creates a docker container but does __not__ start it. See
78−-- "CreateOpts" for a list of options and you can use 'defaultCreateOpts'
78+-- 'CreateOpts' for a list of options and you can use 'defaultCreateOpts'
79-- for some sane defaults.
79-- for some sane defaults.
80createContainer :: forall m. Monad m => CreateOpts -> DockerT m (Either DockerError ContainerID)
80createContainer :: forall m. Monad m => CreateOpts -> DockerT m (Either DockerError ContainerID)
81createContainer opts = requestHelper POST (CreateContainerEndpoint opts) >>= parseResponse
81createContainer opts = requestHelper POST (CreateContainerEndpoint opts) >>= parseResponse
83−-- | Start a container from a given "ContainerID" that we get from
83+-- | Start a container from a given 'ContainerID' that we get from
84−-- 'createContainer'. See "StartOpts" for a list of configuration options
84+-- 'createContainer'. See 'StartOpts' for a list of configuration options
85-- for starting a container. Use 'defaultStartOpts' for sane defaults.
85-- for starting a container. Use 'defaultStartOpts' for sane defaults.
86startContainer :: forall m. Monad m => StartOpts -> ContainerID -> DockerT m (Either DockerError ())
86startContainer :: forall m. Monad m => StartOpts -> ContainerID -> DockerT m (Either DockerError ())
87startContainer sopts cid = requestUnit POST $ StartContainerEndpoint sopts cid
87startContainer sopts cid = requestUnit POST $ StartContainerEndpoint sopts cid
89−-- | Attempts to stop a container with the given "ContainerID" gracefully
89+-- | Attempts to stop a container with the given 'ContainerID' gracefully
90-- (SIGTERM).
90-- (SIGTERM).
91−-- The docker daemon will wait for the given "Tiemout" and then send
91+-- The docker daemon will wait for the given 'Timeout' and then send
92-- a SIGKILL killing the container.
92-- a SIGKILL killing the container.
93stopContainer :: forall m. Monad m => Timeout -> ContainerID -> DockerT m (Either DockerError ())
93stopContainer :: forall m. Monad m => Timeout -> ContainerID -> DockerT m (Either DockerError ())
94stopContainer t cid = requestUnit POST $ StopContainerEndpoint t cid
94stopContainer t cid = requestUnit POST $ StopContainerEndpoint t cid
96−-- | Sends a "Signal" to the container with the given "ContainerID". Same
96+-- | Sends a 'Signal' to the container with the given 'ContainerID'. Same
97−-- as "stopContainer" but you choose the signal directly.
97+-- as 'stopContainer' but you choose the signal directly.
98killContainer :: forall m. Monad m => Signal -> ContainerID -> DockerT m (Either DockerError ())
98killContainer :: forall m. Monad m => Signal -> ContainerID -> DockerT m (Either DockerError ())
99killContainer s cid = requestUnit POST $ KillContainerEndpoint s cid
99killContainer s cid = requestUnit POST $ KillContainerEndpoint s cid
101−-- | Restarts a container with the given "ContainerID".
101+-- | Restarts a container with the given 'ContainerID'.
102restartContainer :: forall m. Monad m => Timeout -> ContainerID -> DockerT m (Either DockerError ())
102restartContainer :: forall m. Monad m => Timeout -> ContainerID -> DockerT m (Either DockerError ())
103restartContainer t cid = requestUnit POST $ RestartContainerEndpoint t cid
103restartContainer t cid = requestUnit POST $ RestartContainerEndpoint t cid
105−-- | Pauses a container with the given "ContainerID"
105+-- | Pauses a container with the given 'ContainerID'.
106pauseContainer :: forall m. Monad m => ContainerID -> DockerT m (Either DockerError ())
106pauseContainer :: forall m. Monad m => ContainerID -> DockerT m (Either DockerError ())
107pauseContainer cid = requestUnit POST $ PauseContainerEndpoint cid
107pauseContainer cid = requestUnit POST $ PauseContainerEndpoint cid
109−-- | Unpauses a container with the given "ContainerID".
109+-- | Unpauses a container with the given 'ContainerID'.
110unpauseContainer :: forall m. Monad m => ContainerID -> DockerT m (Either DockerError ())
110unpauseContainer :: forall m. Monad m => ContainerID -> DockerT m (Either DockerError ())
111unpauseContainer cid = requestUnit GET $ UnpauseContainerEndpoint cid
111unpauseContainer cid = requestUnit GET $ UnpauseContainerEndpoint cid
113−-- | Deletes a container with the given "ContainerID".
113+-- | Deletes a container with the given 'ContainerID'.
114-- See "DeleteOpts" for options and use 'defaultDeleteOpts' for sane
114-- See "DeleteOpts" for options and use 'defaultDeleteOpts' for sane
115-- defaults.
115-- defaults.
116deleteContainer :: forall m. Monad m => DeleteOpts -> ContainerID -> DockerT m (Either DockerError ())
116deleteContainer :: forall m. Monad m => DeleteOpts -> ContainerID -> DockerT m (Either DockerError ())
117deleteContainer dopts cid = requestUnit DELETE $ DeleteContainerEndpoint dopts cid
117deleteContainer dopts cid = requestUnit DELETE $ DeleteContainerEndpoint dopts cid
119−-- | Gets "ContainerDetails" for a given "ContainerID".
119+-- | Gets 'ContainerDetails' for a given 'ContainerID'.
120inspectContainer :: forall m . Monad m => ContainerID -> DockerT m (Either DockerError ContainerDetails)
120inspectContainer :: forall m . Monad m => ContainerID -> DockerT m (Either DockerError ContainerDetails)
121inspectContainer cid = requestHelper GET (InspectContainerEndpoint cid) >>= parseResponse
121inspectContainer cid = requestHelper GET (InspectContainerEndpoint cid) >>= parseResponse
123−-- | Get's container's logs for a given "ContainerID".
123+-- | Get's container's logs for a given 'ContainerID'.
124−-- This will only work with the "JsonFile" "LogDriverType" as the other driver types disable
124+-- This will only work with the 'JsonFile' 'LogDriverType' as the other driver types disable
125−-- this endpoint and it will return a "DockerError".
125+-- this endpoint and it will return a 'DockerError'.
127−-- See "LogOpts" for options that you can pass and
127+-- See 'LogOpts' for options that you can pass and
128-- 'defaultLogOpts' for sane defaults.
128-- 'defaultLogOpts' for sane defaults.
130-- __NOTE__: Currently streaming logs is
130-- __NOTE__: Currently streaming logs is
@@ -133,7 +133,7 @@ inspectContainer cid = requestHelper GET (InspectContainerEndpoint cid) >>= pars
133-- setup of the process in your container this can be a significant amount
133-- setup of the process in your container this can be a significant amount
134-- which might block your application...so use with caution.
134-- which might block your application...so use with caution.
136−-- The recommended method is to use one of the other "LogDriverType"'s available (like
136+-- The recommended method is to use one of the other 'LogDriverType's available (like
137-- syslog) for creating your containers.
137-- syslog) for creating your containers.
138getContainerLogs :: forall m. Monad m => LogOpts -> ContainerID -> DockerT m (Either DockerError BSL.ByteString)
138getContainerLogs :: forall m. Monad m => LogOpts -> ContainerID -> DockerT m (Either DockerError BSL.ByteString)
139getContainerLogs logopts cid = fmap responseBody <$> requestHelper GET (ContainerLogsEndpoint logopts False cid)
139getContainerLogs logopts cid = fmap responseBody <$> requestHelper GET (ContainerLogsEndpoint logopts False cid)