testcontainers-0.1.0.0: Docker containers for your integration tests.

Safe HaskellNone
LanguageHaskell2010

TestContainers.Image

Contents

Synopsis

Collection of pre-defined Docker images

redis :: ToImage Source #

Image for Redis database.

redis = fromTag "redis:5.0"

mongo :: ToImage Source #

Image for Mongo database.

mongo = Tag "mongo:4.0.17"

Building and managing images

data Image Source #

Handle to a Docker image.

Instances
Eq Image Source # 
Instance details

Defined in TestContainers.Docker

Methods

(==) :: Image -> Image -> Bool #

(/=) :: Image -> Image -> Bool #

Show Image Source # 
Instance details

Defined in TestContainers.Docker

Methods

showsPrec :: Int -> Image -> ShowS #

show :: Image -> String #

showList :: [Image] -> ShowS #

data ToImage Source #

A description of how to build an Image.

build :: MonadDocker m => ToImage -> m ToImage Source #

Build the Image referred to by the argument. If the construction of the image is expensive (e.g. a call to fromBuildContext) we don't want to repeatedly build the image. Instead, build can be used to execute the underlying Docker build once and re-use the resulting Image.

fromTag :: ImageTag -> ToImage Source #

Get an Image from a tag.

fromBuildContext :: FilePath -> Maybe FilePath -> ToImage Source #

Build the image from a build path and an optional path to the Dockerfile (default is Dockerfile)

fromDockerfile :: Text -> ToImage Source #

Build a contextless image only from a Dockerfile passed as Text.