docker-client-0.1.0: Funflow's internal docker engine client
Safe HaskellSafe-Inferred
LanguageHaskell2010

Docker.API.Client.Internal.Types

Synopsis

Documentation

newtype OS Source #

Alias for the system type returned by System.Info.os

Constructors

OS String 

data DockerClientError Source #

This type describes common errors the docker client might encounter

Constructors

ContainerCreationFailedError String

The request to create a new container failed

UnrecognizedJSONResponseError String

The docker engine API responded with something we didn't expect

GetContainerArchiveError String

The docker engine API responded with an error status code when getting a container archive

NonZeroExitCode String

The container exited with a nonzero exit code

GetContainerLogsError String

The docker engine API responded with an error when we attempted to get a container's logs

ImagePullError String

The docker engine API responded with an error when we attempted to pull an image

Instances

Instances details
Show DockerClientError Source # 
Instance details

Defined in Docker.API.Client.Internal.Types

Generic DockerClientError Source # 
Instance details

Defined in Docker.API.Client.Internal.Types

Associated Types

type Rep DockerClientError :: Type -> Type #

type Rep DockerClientError Source # 
Instance details

Defined in Docker.API.Client.Internal.Types

type Rep DockerClientError = D1 ('MetaData "DockerClientError" "Docker.API.Client.Internal.Types" "docker-client-0.1.0-BaMdEBOW2kNI2w9fxdLf37" 'False) ((C1 ('MetaCons "ContainerCreationFailedError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: (C1 ('MetaCons "UnrecognizedJSONResponseError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "GetContainerArchiveError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) :+: (C1 ('MetaCons "NonZeroExitCode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: (C1 ('MetaCons "GetContainerLogsError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "ImagePullError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

type ClientErrorMonad a = ExceptT DockerClientError IO a Source #

Wrapper for composing operations which return an Either DockerClientError a

data ContainerSpec Source #

Describes a docker container to be created with runContainer. Use defaultContainerSpec to get a default value.

Constructors

ContainerSpec 

Fields

  • image :: Text

    The image name with an optional tag or digest field (e.g. "python:3.6")

  • cmd :: [Text]

    The container's command. If empty will default to the image default.

  • user :: Text

    Optional user ID to use in the container. If empty will default to the image default.

  • workingDir :: Text

    Optional working directory in the container. If empty will default to the image default.

  • envVars :: [Text]

    Optional list of environment variables of format "FOO=BAR".

  • hostVolumes :: [Text]

    Optional list of host volumes to mount to the container as bind mounts. Must follow the format specied here: https://docs.docker.com/storage/bind-mounts/

Instances

Instances details
Show ContainerSpec Source # 
Instance details

Defined in Docker.API.Client.Internal.Types

Generic ContainerSpec Source # 
Instance details

Defined in Docker.API.Client.Internal.Types

Associated Types

type Rep ContainerSpec :: Type -> Type #

type Rep ContainerSpec Source # 
Instance details

Defined in Docker.API.Client.Internal.Types

type Rep ContainerSpec = D1 ('MetaData "ContainerSpec" "Docker.API.Client.Internal.Types" "docker-client-0.1.0-BaMdEBOW2kNI2w9fxdLf37" 'False) (C1 ('MetaCons "ContainerSpec" 'PrefixI 'True) ((S1 ('MetaSel ('Just "image") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "cmd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "user") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "workingDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "envVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "hostVolumes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])))))

defaultContainerSpec Source #

Arguments

:: Text

The container's Docker Image. May optionally include a tag or digest field (e.g. "python:3.6"). If neither a tag or digest is specified the image will default to the latest tag.

-> ContainerSpec 

Constructs a simple default ContainerSpec for a docker image which uses the image's default values for all other aguments.

data DockerStreamType Source #

Possible types of streams returned by the Docker Engine API attach and logs endpoints. Used only internally for parsing the stream metadata returned by docker.