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
- dockerOptsFromMonoid :: Maybe Project -> Path Abs Dir -> DockerOptsMonoid -> DockerOpts
- dockerPullCmdName :: String
- execWithOptionalContainer :: M env m => Maybe (Path Abs Dir) -> IO (FilePath, [String], [(String, String)], Config -> Config) -> Maybe (m ()) -> IO () -> Maybe (m ()) -> Maybe (m ()) -> 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 => Maybe (Path Abs Dir) -> Bool -> m ()
- reExecArgName :: String
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"
dockerOptsFromMonoid :: Maybe Project -> Path Abs Dir -> DockerOptsMonoid -> DockerOpts Source
Interprets DockerOptsMonoid options.
dockerPullCmdName :: String Source
Command-line argument for docker pull
.
execWithOptionalContainer :: M env m => Maybe (Path Abs Dir) -> IO (FilePath, [String], [(String, String)], Config -> Config) -> Maybe (m ()) -> IO () -> Maybe (m ()) -> Maybe (m ()) -> m () Source
If Docker is enabled, re-runs the OS command returned by the second argument in a Docker container. Otherwise, runs the inner action.
This takes an optional release action just like reexecWithOptionalContainer
.
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 => Maybe (Path Abs Dir) -> Bool -> m () Source
Remove the project's Docker sandbox.
reExecArgName :: String Source
Command-line option for --internal-re-exec
.