Copyright | (c) Nickolay Kudasov 2014 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | nickolay.kudasov@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Options and structures to run commands inside LXC containers. You can get more info about LXC at https://help.ubuntu.com/lts/serverguide/lxc.html.
Normally you should import System.LXC
module only.
- data AttachOptions = AttachOptions {
- attachFlags :: [AttachFlag]
- attachNamespaces :: Int
- attachPersonality :: Maybe Int64
- attachInitialCWD :: Maybe FilePath
- attachUID :: UserID
- attachGID :: GroupID
- attachEnvPolicy :: AttachEnvPolicy
- attachExtraEnvVars :: [String]
- attachExtraKeepEnv :: [String]
- attachStdinFD :: Fd
- attachStdoutFD :: Fd
- attachStderrFD :: Fd
- defaultAttachOptions :: AttachOptions
- data AttachCommand = AttachCommand {
- attachProgram :: String
- attachArgv :: [String]
- newtype AttachExecFn = AttachExecFn {}
- attachRunCommand :: AttachExecFn
- attachRunShell :: AttachExecFn
- data AttachEnvPolicy
- data AttachFlag
- fromAttachEnvPolicy :: Num a => AttachEnvPolicy -> a
- fromAttachFlag :: Num a => AttachFlag -> a
Attach options
data AttachOptions Source
LXC attach options for attach
.
- NOTE: for
stdin
,stdout
andstderr
descriptorsdup2()
will be used before callingexec_function
, (assuming not0
,1
and2
are specified) and the original fds are closed before passing control over. AnyO_CLOEXEC
flag will be removed after that.
AttachOptions | |
|
defaultAttachOptions :: AttachOptions Source
Default attach options to use.
Attach command
data AttachCommand Source
Representation of a command to run in a container.
AttachCommand | |
|
Attach exec
functions
newtype AttachExecFn Source
exec
function to use for attach
.
See attachRunCommand
and attachRunShell
.
attachRunCommand :: AttachExecFn Source
Run a command in the container.
attachRunShell :: AttachExecFn Source
Run a shell command in the container.
Flags and environment policies
data AttachEnvPolicy Source
LXC environment policy.
AttachKeepEnv | Retain the environment. |
AttachClearEnv | Clear the environment. |
data AttachFlag Source
Flags for attach
.
AttachMoveToCGroup | Move to cgroup. On by default. |
AttachDropCapabilities | Drop capabilities. On by default. |
AttachSetPersonality | Set personality. On by default |
AttachLSMExec | Execute under a Linux Security Module. On by default. |
AttachRemountProcSys | Remount /proc filesystem. Off by default. |
AttachLSMNow | FIXME: unknown. Off by default. |
AttachDefault | Mask of flags to apply by default. |
AttachLSM | All Linux Security Module flags. |
fromAttachEnvPolicy :: Num a => AttachEnvPolicy -> a Source
Convert AttachEnvPolicy
to internal representation.
fromAttachFlag :: Num a => AttachFlag -> a Source
Convert AttachFlag
to bit flag.