Safe Haskell | None |
---|---|
Language | Haskell2010 |
Run commands in Docker containers
- cleanup :: M env m => CleanupOpts -> m ()
- data CleanupOpts = CleanupOpts {
- dcAction :: !CleanupAction
- dcRemoveKnownImagesLastUsedDaysAgo :: !(Maybe Integer)
- dcRemoveUnknownImagesCreatedDaysAgo :: !(Maybe Integer)
- dcRemoveDanglingImagesCreatedDaysAgo :: !(Maybe Integer)
- dcRemoveStoppedContainersCreatedDaysAgo :: !(Maybe Integer)
- dcRemoveRunningContainersCreatedDaysAgo :: !(Maybe Integer)
- data CleanupAction
- dockerCleanupCmdName :: String
- dockerCmdName :: String
- dockerHelpOptName :: String
- dockerPullCmdName :: String
- entrypoint :: (MonadIO m, MonadBaseControl IO m, MonadCatch m, MonadLogger m) => Config -> DockerEntrypoint -> m ()
- preventInContainer :: (MonadIO m, MonadThrow m) => m () -> m ()
- pull :: M env m => m ()
- reexecWithOptionalContainer :: M env m => Maybe (Path Abs Dir) -> Maybe (m ()) -> IO () -> Maybe (m ()) -> Maybe (m ()) -> m ()
- reset :: (MonadIO m, MonadReader env m, HasConfig env) => Maybe (Path Abs Dir) -> Bool -> m ()
- reExecArgName :: String
- data StackDockerException
- = DockerMustBeEnabledException
- | OnlyOnHostException
- | InspectFailedException String
- | NotPulledException String
- | InvalidCleanupCommandException 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
Documentation
cleanup :: M env m => CleanupOpts -> m () Source
Clean-up old docker images and containers.
data CleanupOpts Source
Options for cleanup
.
data CleanupAction Source
Cleanup action.
dockerCleanupCmdName :: String Source
Command-line argument for docker cleanup
.
dockerCmdName :: String Source
Command-line argument for "docker"
dockerPullCmdName :: String Source
Command-line argument for docker pull
.
entrypoint :: (MonadIO m, MonadBaseControl IO m, MonadCatch m, MonadLogger m) => Config -> DockerEntrypoint -> m () 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, MonadThrow m) => m () -> m () Source
Error if running in a container.
reexecWithOptionalContainer :: M env m => Maybe (Path Abs Dir) -> Maybe (m ()) -> IO () -> Maybe (m ()) -> Maybe (m ()) -> m () Source
If Docker is enabled, re-runs the currently running OS command in a Docker container. Otherwise, runs the inner action.
This takes an optional release action which should be taken IFF control is transfering away from the current process to the intra-container one. The main use for this is releasing a lock. After launching reexecution, the host process becomes nothing but an manager for the call into docker and thus may not hold the lock.
reset :: (MonadIO m, MonadReader env m, HasConfig env) => Maybe (Path Abs Dir) -> Bool -> m () 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.
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. |
InvalidCleanupCommandException String | Input to |
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. |
Show StackDockerException Source | Show instance for StackDockerException. |
Exception StackDockerException Source | Exception instance for StackDockerException. |