The following operations should be supported by all runtimes. A container runtime supports an operation by invoking ‘[binary name] [operation name]’.
The following examples use ‘funC’ as the runtime, an alternate runtime can be used by substituting its name where funC
appears.
All operations should support the following flags:
- log: Redirects logs to the given file
- logLevel: Sets the log level
- id: The ID of the container. Defaults to the current directory if not specified.
~~~~
funC start [bundlePath] [-id id]
~~~~
Starts the container described by the bundle. The ID of the container will be the directory name of the container.
Flags:
- Standard Flags
Example:
funC start /path/to/bundle -id 1234-abc-def
Exit codes:
- Exits with the exit code of the underlying process
~~~~
funC exec [-id id]
~~~~
Runs a secondary process in the given container.
Arguments:
- processJson - a json encoded according to the definition of specs.Process
Flags:
- Standard Flags, plus:
—start
: starts the container if neccessary
Example:
funC exec
Exit codes:
- Exits with the exit code of the underlying process
~~~~
funC pause [-id id]
~~~~
Pauses the container, which temporarily ceases execution of all processes (but allows them to later be Resume
d).
Flags:
- Standard Flags
Example:
funC pause
Exit code:
- 0 on success, non-zero on error.
~~~~
funC signal [-id id] [-signal SIGNAL]
~~~~
Sends a signal to the container. Defaults to SIG_KILL. The Signal must be one of the valid posix signals.
Flags:
- Standard Flags
Example:
funC signal -id 1234-abcd-5678 -signal KILL
Exit code:
- 0 on success, non-zero on error. A 0 exit status does not imply the process has exited (as it may have caught the signal).