Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data DockerException
- = DockerException { }
- | InspectUnknownContainerId {
- id :: ContainerId
- | InspectOutputInvalidJSON {
- id :: ContainerId
- | InspectOutputMissingNetwork {
- id :: ContainerId
- | InspectOutputUnexpected {
- id :: ContainerId
- | UnknownPortMapping {
- id :: ContainerId
- port :: Text
- type ContainerId = Text
- type InspectOutput = Value
- type NetworkId = Text
- docker :: MonadIO m => Tracer -> [Text] -> m String
- dockerWithStdin :: MonadIO m => Tracer -> [Text] -> Text -> m String
- data Pipe
- type LogConsumer = Pipe -> ByteString -> IO ()
- consoleLogConsumer :: LogConsumer
- dockerFollowLogs :: MonadResource m => Tracer -> ContainerId -> LogConsumer -> m ()
Documentation
data DockerException Source #
Failing to interact with Docker results in this exception being thrown.
Since: 0.1.0.0
DockerException | |
InspectUnknownContainerId | |
| |
InspectOutputInvalidJSON | |
| |
InspectOutputMissingNetwork | |
| |
InspectOutputUnexpected | |
| |
UnknownPortMapping | |
|
Instances
Exception DockerException Source # | |
Defined in TestContainers.Docker.Internal | |
Show DockerException Source # | |
Defined in TestContainers.Docker.Internal showsPrec :: Int -> DockerException -> ShowS # show :: DockerException -> String # showList :: [DockerException] -> ShowS # | |
Eq DockerException Source # | |
Defined in TestContainers.Docker.Internal (==) :: DockerException -> DockerException -> Bool # (/=) :: DockerException -> DockerException -> Bool # |
Container related stuff
type ContainerId = Text Source #
Identifies a container within the Docker runtime. Assigned by docker run
.
Since: 0.1.0.0
type InspectOutput = Value Source #
The parsed JSON output of docker inspect command.
Since: 0.1.0.0
Network related stuff
type NetworkId = Text Source #
Identifies a network within the Docker runtime. Assigned by docker network create
Since: 0.4.0.0
Running docker
docker :: MonadIO m => Tracer -> [Text] -> m String Source #
Internal function that runs Docker. Takes care of throwing an exception in case of failure.
Since: 0.1.0.0
dockerWithStdin :: MonadIO m => Tracer -> [Text] -> Text -> m String Source #
Internal function that runs Docker. Takes care of throwing an exception in case of failure.
Since: 0.1.0.0
Following logs
A data type indicating which pipe to scan for a specific log line.
Since: 0.1.0.0
type LogConsumer = Pipe -> ByteString -> IO () Source #
An abstraction for forwarding logs.
Since: 0.4.0.0
consoleLogConsumer :: LogConsumer Source #
A simple LogConsumer
that writes log lines to stdout and stderr respectively.
Since: 0.4.0.0
dockerFollowLogs :: MonadResource m => Tracer -> ContainerId -> LogConsumer -> m () Source #
Forwards container logs to a LogConsumer
. This is equivalent of calling docker logs containerId --follow
Since: 0.4.0.0