Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Run commands in Docker containers
Synopsis
- dockerCmdName :: String
- dockerHelpOptName :: String
- dockerPullCmdName :: String
- entrypoint :: (HasProcessContext env, HasLogFunc env) => Config -> DockerEntrypoint -> RIO env ()
- preventInContainer :: MonadIO m => m () -> m ()
- pull :: HasConfig env => RIO env ()
- reset :: HasConfig env => Bool -> RIO env ()
- reExecArgName :: String
- data DockerException
- = DockerMustBeEnabledException
- | OnlyOnHostException
- | InspectFailedException String
- | NotPulledException String
- | InvalidImagesOutputException String
- | InvalidPSOutputException String
- | InvalidInspectOutputException String
- | PullFailedException String
- | DockerTooOldException Version Version
- | DockerVersionProhibitedException [Version] Version
- | BadDockerVersionException VersionRange Version
- | InvalidVersionOutputException
- | HostStackTooOldException Version (Maybe Version)
- | ContainerStackTooOldException Version Version
- | CannotDetermineProjectRootException
- | DockerNotInstalledException
- | UnsupportedStackExeHostPlatformException
- | DockerStackExeParseException String
- getProjectRoot :: HasConfig env => RIO env (Path Abs Dir)
- runContainerAndExit :: HasConfig env => RIO env void
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.
reExecArgName :: String Source #
Command-line option for --internal-re-exec-version
.
data DockerException Source #
Type representing exceptions thrown by functions exported by the Stack.Docker module.
DockerMustBeEnabledException | Docker must be enabled to use the command. |
OnlyOnHostException | Command must be run on host OS (not in a container). |
InspectFailedException String |
|
NotPulledException String | Image does not exist. |
InvalidImagesOutputException String | Invalid output from |
InvalidPSOutputException String | Invalid output from |
InvalidInspectOutputException String | Invalid output from |
PullFailedException String | Could not pull a Docker image. |
DockerTooOldException Version Version | Installed version of |
DockerVersionProhibitedException [Version] Version | Installed version of |
BadDockerVersionException VersionRange Version | Installed version of |
InvalidVersionOutputException | Invalid output from |
HostStackTooOldException Version (Maybe Version) | Version of |
ContainerStackTooOldException Version Version | Version of |
CannotDetermineProjectRootException | Can't determine the project root (where to put docker sandbox). |
DockerNotInstalledException |
|
UnsupportedStackExeHostPlatformException | Using host stack-exe on unsupported platform. |
DockerStackExeParseException String |
|
Instances
Exception DockerException Source # | |
Defined in Stack.Types.Docker | |
Show DockerException Source # | |
Defined in Stack.Types.Docker showsPrec :: Int -> DockerException -> ShowS # show :: DockerException -> String # showList :: [DockerException] -> ShowS # |
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.