stack-3.1.1: The Haskell Tool Stack
Safe HaskellSafe-Inferred
LanguageGHC2021

Stack.Types.Docker

Description

Docker types.

Synopsis

Documentation

data DockerException Source #

Type representing exceptions thrown by functions exported by the Stack.Docker module.

Constructors

DockerMustBeEnabledException

Docker must be enabled to use the command.

OnlyOnHostException

Command must be run on host OS (not in a container).

InspectFailedException String

docker inspect failed.

NotPulledException String

Image does not exist.

InvalidImagesOutputException String

Invalid output from docker images.

InvalidPSOutputException String

Invalid output from docker ps.

InvalidInspectOutputException String

Invalid output from docker inspect.

PullFailedException String

Could not pull a Docker image.

DockerTooOldException Version Version

Installed version of docker below minimum version.

DockerVersionProhibitedException [Version] Version

Installed version of docker is prohibited.

BadDockerVersionException VersionRange Version

Installed version of docker is out of range specified in config file.

InvalidVersionOutputException

Invalid output from docker --version.

HostStackTooOldException Version (Maybe Version)

Version of stack on host is too old for version in image.

ContainerStackTooOldException Version Version

Version of stack in container/image is too old for version on host.

CannotDetermineProjectRootException

Can't determine the project root (where to put docker sandbox).

DockerNotInstalledException

docker --version failed.

UnsupportedStackExeHostPlatformException

Using host stack-exe on unsupported platform.

DockerStackExeParseException String

stack-exe option fails to parse.

data DockerMonoidRepoOrImage Source #

Options for Docker repository or image.

Instances

Instances details
Show DockerMonoidRepoOrImage Source # 
Instance details

Defined in Stack.Types.Docker

data DockerOpts Source #

Docker configuration.

Constructors

DockerOpts 

Fields

Instances

Instances details
Show DockerOpts Source # 
Instance details

Defined in Stack.Types.Docker

Methods

showsPrec :: Int -> DockerOpts -> ShowS #

show :: DockerOpts -> String #

showList :: [DockerOpts] -> ShowS #

data DockerOptsMonoid Source #

An uninterpreted representation of docker options. Configurations may be "cascaded" using mappend (left-biased).

Constructors

DockerOptsMonoid 

Fields

Instances

Instances details
Monoid DockerOptsMonoid Source #

Left-biased combine Docker options

Instance details

Defined in Stack.Types.Docker

Semigroup DockerOptsMonoid Source #

Left-biased combine Docker options

Instance details

Defined in Stack.Types.Docker

Generic DockerOptsMonoid Source # 
Instance details

Defined in Stack.Types.Docker

Associated Types

type Rep DockerOptsMonoid :: Type -> Type #

Show DockerOptsMonoid Source # 
Instance details

Defined in Stack.Types.Docker

FromJSON (WithJSONWarnings DockerOptsMonoid) Source #

Decode uninterpreted docker options from JSON/YAML.

Instance details

Defined in Stack.Types.Docker

type Rep DockerOptsMonoid Source # 
Instance details

Defined in Stack.Types.Docker

type Rep DockerOptsMonoid = D1 ('MetaData "DockerOptsMonoid" "Stack.Types.Docker" "stack-3.1.1-I5OI2i8TUoz1thruFO0H72" 'False) (C1 ('MetaCons "DockerOptsMonoid" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "defaultEnable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Any) :*: S1 ('MetaSel ('Just "enable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First Bool))) :*: (S1 ('MetaSel ('Just "repoOrImage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First DockerMonoidRepoOrImage)) :*: S1 ('MetaSel ('Just "registryLogin") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First Bool)))) :*: ((S1 ('MetaSel ('Just "registryUsername") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First String)) :*: S1 ('MetaSel ('Just "registryPassword") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First String))) :*: (S1 ('MetaSel ('Just "autoPull") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FirstTrue) :*: (S1 ('MetaSel ('Just "detach") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FirstFalse) :*: S1 ('MetaSel ('Just "persist") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FirstFalse))))) :*: (((S1 ('MetaSel ('Just "containerName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First String)) :*: S1 ('MetaSel ('Just "network") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First String))) :*: (S1 ('MetaSel ('Just "runArgs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String]) :*: S1 ('MetaSel ('Just "mount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Mount]))) :*: ((S1 ('MetaSel ('Just "mountMode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First String)) :*: S1 ('MetaSel ('Just "env") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String])) :*: (S1 ('MetaSel ('Just "stackExe") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First DockerStackExe)) :*: (S1 ('MetaSel ('Just "setUser") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (First Bool)) :*: S1 ('MetaSel ('Just "requireDockerVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IntersectingVersionRange)))))))

data DockerStackExe Source #

Where to get the stack executable to run in Docker containers

Constructors

DockerStackExeDownload

Download from official bindist

DockerStackExeHost

Host's stack (linux-x86_64 only)

DockerStackExeImage

Docker image's stack (versions must match)

DockerStackExePath (Path Abs File)

Executable at given path

Instances

Instances details
FromJSON DockerStackExe Source # 
Instance details

Defined in Stack.Types.Docker

Show DockerStackExe Source # 
Instance details

Defined in Stack.Types.Docker

Methods

showsPrec :: Int -> DockerStackExe -> ShowS #

show :: DockerStackExe -> String #

showList :: [DockerStackExe] -> ShowS #

data Mount Source #

Docker volume mount.

Constructors

Mount String String 

Instances

Instances details
FromJSON Mount Source #

For YAML.

Instance details

Defined in Stack.Types.Docker

Read Mount Source #

For optparse-applicative.

Instance details

Defined in Stack.Types.Docker

Methods

readsPrec :: Int -> ReadS Mount #

readList :: ReadS [Mount] #

readPrec :: ReadPrec Mount #

readListPrec :: ReadPrec [Mount] #

Show Mount Source #

Show instance.

Instance details

Defined in Stack.Types.Docker

Methods

showsPrec :: Int -> Mount -> ShowS #

show :: Mount -> String #

showList :: [Mount] -> ShowS #

newtype VersionRangeJSON Source #

Newtype for non-orphan FromJSON instance.

Instances

Instances details
FromJSON VersionRangeJSON Source #

Parse VersionRange.

Instance details

Defined in Stack.Types.Docker

dockerAutoPullArgName :: Text Source #

Docker auto-pull argument name.

dockerCmdName :: String Source #

Command-line argument for "docker"

dockerContainerNameArgName :: Text Source #

Docker container name argument name.

dockerContainerPlatform :: Platform Source #

Platform that Docker containers run

dockerDetachArgName :: Text Source #

Docker detach argument name.

dockerEnableArgName :: Text Source #

Docker enable argument name.

dockerEntrypointArgName :: String Source #

Argument name used to pass docker entrypoint data (only used internally)

dockerEnvArgName :: Text Source #

Docker environment variable argument name.

dockerImageArgName :: Text Source #

Docker image argument name.

dockerMountArgName :: Text Source #

Docker mount argument name.

dockerMountModeArgName :: Text Source #

Docker mount mode argument name.

dockerNetworkArgName :: Text Source #

Docker container name argument name.

dockerPersistArgName :: Text Source #

Docker persist argument name.

dockerPullCmdName :: String Source #

Command-line argument for docker pull.

dockerRegistryLoginArgName :: Text Source #

Docker registry login argument name.

dockerRegistryPasswordArgName :: Text Source #

Docker registry password argument name.

dockerRegistryUsernameArgName :: Text Source #

Docker registry username argument name.

dockerRepoArgName :: Text Source #

Docker repo arg argument name.

dockerRequireDockerVersionArgName :: Text Source #

Docker require-version argument name

dockerRunArgsArgName :: Text Source #

Docker run args argument name.

dockerSetUserArgName :: Text Source #

Docker set-user argument name

dockerStackExeArgName :: Text Source #

Docker Stack executable argument name.

dockerStackExeDownloadVal :: String Source #

Value for --docker-stack-exe=download

dockerStackExeHostVal :: String Source #

Value for --docker-stack-exe=host

dockerStackExeImageVal :: String Source #

Value for --docker-stack-exe=image

reExecArgName :: String Source #

Command-line option for --internal-re-exec-version.