| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Stack.Docker
Description
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 StackDockerException
- = 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 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 |
|
| 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
| Show StackDockerException Source # | |
Defined in Stack.Types.Docker Methods showsPrec :: Int -> StackDockerException -> ShowS # show :: StackDockerException -> String # showList :: [StackDockerException] -> ShowS # | |
| Exception StackDockerException Source # | |
Defined in Stack.Types.Docker Methods toException :: StackDockerException -> SomeException # fromException :: SomeException -> Maybe StackDockerException # | |
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.