Created
September 15, 2015 07:55
-
-
Save julz/b1c7ee9c82f0bc3044d0 to your computer and use it in GitHub Desktop.
Revisions
-
julz created this gist
Sep 15, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,104 @@ # Standard Operations 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. ## Standard Flags 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. ## Operations ### Start ~~~~ 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_ ### Exec ~~~~ 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_ ### Pause ~~~~ 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. ## Signal ~~~~ 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).