!W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVNone "$,>SXdg{Etestcontainers1The parsed JSON output of docker inspect command.testcontainersHandle to a Docker container.Wtestcontainers?The container Id assigned by Docker, uniquely identifying this .Xtestcontainers Underlying Y for the resource finalizer.ZtestcontainersThe underlying  of this container.[testcontainers4Configuration used to create and run this container.\testcontainersEMemoized output of `docker inspect`. This is being calculated lazily.testcontainersHandle to a Docker image.]testcontainers9The image tag assigned by Docker. Uniquely identifies an  within Docker.testcontainersBA data type indicating which pipe to scan for a specific log line.testcontainersRefer to logs on STDOUT.testcontainersRefer to logs on STDERR. testcontainersThe exception thrown by 7. testcontainers>The id of the underlying container that was not ready in time. testcontainersThe exception thrown by  waitForLine- in case the expected log line wasn't found.testcontainers#The id of the underlying container.testcontainers6A strategy that describes how to asses readiness of a 9. Allows Users to plug in their definition of readiness.^testcontainersADumb logger abstraction to allow us to trace container execution.testcontainers>Identifies a container within the Docker runtime. Assigned by  docker run.testcontainers!A description of how to build an .testcontainersA tag to a Docker image.testcontainers,Parameters for a running a Docker container.testcontainers8Docker related functionality is parameterized over this _.testcontainersHFailing to interact with Docker results in this exception being thrown.testcontainers+Exit code of the underlying Docker process.testcontainers%Arguments that were passed to Docker.testcontainersDocker's STDERR output.testcontainers Id of the + that we tried to lookup the port mapping.testcontainersBTextual representation of port mapping we were trying to look up. testcontainers&Configuration for defaulting behavior.!Note that IP address returned by @2 is not reachable when using Docker For Mac (See  _https://docs.docker.com/docker-for-mac/networking/#per-container-ip-addressing-is-not-possible).3If you are targeting Docker For Mac you should use $, instead use #."testcontainersHow to retrieve the IP address of a Docker container. There some known limitations around Docker for Mac in that it doesn't support accessing containers by their IP (see @).9This configuration let's you define how to access the IP.#testcontainersDefault configuration.$testcontainersA default configuration to use with Docker for Mac installations. It doesn't use a Docker container's IP address to access a container, instead it always uses the loopback interface 0.0.0.0.%testcontainers`Autoselect the default configuration depending on wether you use Docker For Mac/Desktop or not.&testcontainersDefault *. Used as base for every Docker container.'testcontainersCSet the name of a Docker container. This is equivalent to invoking  docker run with the --name parameter.(testcontainersjThe command to execute inside the Docker container. This is the equivalent of passing the command on the  docker run invocation.)testcontainersKWether to remove the container once exited. This is equivalent to passing --rm to  docker run. (default is `).*testcontainersESet the environment for the container. This is equivalent to passing --env key=value to  docker run.+testcontainers9Set link on the container. This is equivalent to passing --link other_container to  docker run.,testcontainersBSet exposed ports on the container. This is equivalent to setting --publish $PORT to  docker runG. Docker assigns a random port for the host port. You will have to use @ and A" to connect to the published port.  container <- . $ & redis & ,* [ 6379 ] let (redisHost, redisPort) = (@ container, A0 container 6379) print (redisHost, redisPort) -testcontainersSet the waiting strategy on the container. Depending on a Docker container it can take some time until the provided service is ready. You will want to use to -. to block until the container is ready to use..testcontainers Runs a Docker container from an  and }. A finalizer is registered so that the container is aways stopped when it goes out of scope. This function is essentially  docker run.atestcontainers\Internal function that runs Docker. Takes care of throwing an exception in case of failure.btestcontainers\Internal function that runs Docker. Takes care of throwing an exception in case of failure./testcontainersKills a Docker container. / is essentially  docker kill.0testcontainersStops a Docker container. 0 is essentially  docker stop.1testcontainersRemove a Docker container. 1 is essentially  docker rm -f2testcontainersMAccess STDOUT and STDERR of a running Docker container. This is essentially  docker logs under the hood.3testcontainers Build the ] referred to by the argument. If the construction of the image is expensive (e.g. a call to 59) we don't want to repeatedly build the image. Instead, 3S can be used to execute the underlying Docker build once and re-use the resulting .ctestcontainersDefault . Doesn't apply anything to to ContainerRequests.4testcontainersGet an  from a tag.5testcontainersaBuild the image from a build path and an optional path to the Dockerfile (default is Dockerfile)6testcontainers;Build a contextless image only from a Dockerfile passed as d.etestcontainers!Logger that doesn't log anything.7testcontainers!waitUntilTimeout n waitUntilReady waits nQ seconds for the container to be ready. If the container is not ready by then a   will be thrown.8testcontainerspWaits until the port of a container is ready to accept connections. This combinator should always be used with 7.9testcontainerssA low-level primitive that allows scanning the logs for specific log lines that indicate readiness of a container.The f,s passed to the function argument represent stdout and stderr of the container.:testcontainers9Waits for a specific line to occur in the logs. Throws a  B exception in case the desired line can not be found on the logs.MSay you want to find "Ready to accept connections" in the logs on Stdout try: 6wairForLogLine Stdout ("Ready to accept connections" `g`) ;testcontainers%Blocks until the container is ready. ;/ might throw exceptions depending on the used  on the container.<testcontainers9The image tag assigned by Docker. Uniquely identifies an  within Docker.=testcontainers Returns the id of the container.>testcontainers.Returns the underlying image of the container.?testcontainersReturns the internal release key used for safely shutting down the container. Use this with care. This function is considered an internal detail.@testcontainers)Looks up the ip address of the container.htestcontainers7Get the IP address of a running Docker container using docker inspect.Atestcontainers%Looks up an exposed port on the host.Btestcontainers7Runs the `docker inspect` command. Memoizes the result.itestcontainers"Runs the `docker inspect` command.E  !"#$%&'()*+,-./0123456789:;<=>?@ABCDE !"#$%<=>@A?4563&'()*+,-.B0/12; 79 :CD8NoneStestcontainersImage for Redis database. redis = fromTag "redis:5.0" TtestcontainersImage for Mongo database. mongo = Tag "mongo:4.0.17" 3456STST3456NoneC  !"#$%&'()*+,-./012345789:<>?@ABCDSTC<453&'()*+,-@A?>.B0/1279:8 !"#$% CDSTNone>SXUtestcontainersAllow m to depend on Docker containers. Hspec takes care of initialization and de-initialization of the containers.  containers :: MonadDocker m => m Boolean containers = do _redis <- TestContainers.run $ TestContainers.containerRequest TestContainers.redis _kafka <- TestContainers.run $ TestContainers.containerRequest TestContainers.kafka pure True example :: Spec example = around (withContainers containers) $ describe "Example tests" it "first test" $ \isBoolean -> do isBoolean shouldBe True UF allows you naturally scope the handling of containers for your tests.D  !"#$%&'()*+,-./012345789:<>?@ABCDSTUUNone>SXVtestcontainersAllow  m to depend on Docker containers. Tasty takes care of initialization and de-initialization of the containers. z containers :: MonadDocker m => m () containers = do _redis <- TestContainers.run $ TestContainers.containerRequest TestContainers.redis _kafka <- TestContainers.run $ TestContainers.containerRequest TestContainers.kafka pure () example :: TestTree example = withContainers containers $ \runContainers -> testGroup "Example tests" [ testCase "first test" $ do -- Actually runs the container. runContainers testCase "second test" $ do -- Start containers. Tasty makes sure to only initialize once as -- `first test` might already have started them. runContainers ] VF allows you naturally scope the handling of containers for your tests.D  !"#$%&'()*+,-./012345789:<>?@ABCDSTVVj   !""#$%&'()*+,,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_``ab cdefgh ijklmnopqrst uvqwxyz{-testcontainers-0.2.0.0-IuTeYlIMb0yAKTjibLAmiyTestContainers.DockerTestContainers.ImageTestContainers.HspecTestContainers.TastyTestContainersHspecSpecTastyTestTreebase Data.Function&(resourcet-1.2.4.2-B3d6if2mvK0991yIwTpqV0Control.Monad.Trans.Resource runResourceT%Control.Monad.Trans.Resource.InternalResIO InspectOutput ContainerImagePipeStdoutStderrTimeoutException$sel:id:TimeoutExceptionUnexpectedEndOfPipe$sel:id:UnexpectedEndOfPipeWaitUntilReady ContainerIdToImageImageTagContainerRequest MonadDockerDockerExceptionInspectUnknownContainerIdInspectOutputInvalidJSONInspectOutputUnexpectedUnknownPortMapping$sel:exitCode:DockerException$sel:args:DockerException$sel:stderr:DockerException$sel:id:DockerException$sel:port:DockerExceptionConfig$sel:configContainerIp:ConfigdefaultDockerConfigdockerForMacConfigdetermineConfigcontainerRequestsetNamesetCmdsetRmsetEnvsetLink setExpose setWaitingForrunkillstoprmwithLogsbuildfromTagfromBuildContextfromDockerfilewaitUntilTimeoutwaitUntilMappedPortReachable waitWithLogswaitForLogLinewaitUntilReadyimageTag containerIdcontainerImagecontainerReleaseKey containerIp containerPortinspect dockerVersionisDockerForDesktop$fExceptionDockerException$fExceptionUnexpectedEndOfPipe$fExceptionTimeoutException$fEqDockerException$fShowDockerException$fEqUnexpectedEndOfPipe$fShowUnexpectedEndOfPipe$fEqTimeoutException$fShowTimeoutException$fEqPipe $fOrdPipe $fShowPipe $fEqImage $fShowImageredismongowithContainers$sel:id:Container$sel:releaseKey:Container ReleaseKey$sel:image:Container$sel:config:Container$sel:inspectOutput:Container$sel:tag:ImageLoggerGHC.BaseMonadghc-prim GHC.TypesTruedockerdockerWithStdindefaultToImage text-1.2.3.1Data.Text.InternalText silentLoggerGHC.IO.Handle.TypesHandleData.Text.Lazy isInfixOfinternalContainerIpinternalInspect