stack-2.3.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Docker

Description

Run commands in Docker containers

Synopsis

Documentation

dockerCmdName :: String Source #

Command-line argument for "docker"

dockerPullCmdName :: String Source #

Command-line argument for docker pull.

entrypoint :: (HasProcessContext env, HasLogFunc env) => Config -> DockerEntrypoint -> RIO env () Source #

The Docker container "entrypoint": special actions performed when first entering a container, such as switching the UID/GID to the "outside-Docker" user's.

preventInContainer :: MonadIO m => m () -> m () Source #

Error if running in a container.

pull :: HasConfig env => RIO env () Source #

Pull latest version of configured Docker image from registry.

reset :: HasConfig env => Bool -> RIO env () Source #

Remove the project's Docker sandbox.

reExecArgName :: String Source #

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

data StackDockerException Source #

Exceptions thrown by Stack.Docker.

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.

getProjectRoot :: HasConfig env => RIO env (Path Abs Dir) Source #

Fail with friendly error if project root not set.

runContainerAndExit :: HasConfig env => RIO env void Source #

Run a command in a new Docker container, then exit the process.