Documentation ¶
Overview ¶
Package runc
Index ¶
- Constants
- func NewContainerRuntime(cmd string, logger *logs.Logger) api.ContainerManager
- type CreateOpts
- type RuncConfig
- func (r *RuncConfig) Create(c *CreateOpts) error
- func (r *RuncConfig) Delete(id string, force bool) error
- func (r *RuncConfig) Kill(id string, signal string, all bool) (err error)
- func (r *RuncConfig) List() (list []*api.Container, err error)
- func (r *RuncConfig) Pause(ID string) (err error)
- func (r *RuncConfig) Resume(ID string) (err error)
- func (r *RuncConfig) Run(c *CreateOpts) error
- func (r *RuncConfig) RunWithStdio(c *CreateOpts, stdout io.WriteCloser, stderr io.WriteCloser) error
- func (r *RuncConfig) Start(id string) error
- func (r *RuncConfig) State(id string) (container *api.Container, err error)
- func (r *RuncConfig) UpdateResource(u *UpdateResourceOpts) (err error)
- type RuncContainerStatus
- type RuncCtl
- type UpdateResourceOpts
Constants ¶
View Source
const (
DefaultCommand = "runc"
)
Variables ¶
This section is empty.
Functions ¶
func NewContainerRuntime ¶
func NewContainerRuntime(cmd string, logger *logs.Logger) api.ContainerManager
Types ¶
type RuncConfig ¶
func (*RuncConfig) Create ¶
func (r *RuncConfig) Create(c *CreateOpts) error
USAGE:
runc create [command options] <container-id>
OPTIONS:
--bundle value, -b value path to the root of the bundle directory, defaults to the current directory --console-socket value path to an AF_UNIX socket which will receive a file descriptor referencing the master end of the console's pseudoterminal --pid-file value specify the file to write the process id to --no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk --no-new-keyring do not create a new session keyring for the container. This will cause the container to inherit the calling processes session key --preserve-fds value Pass N additional file descriptors to the container (stdio + $LISTEN_FDS + N in total) (default: 0)
func (*RuncConfig) Delete ¶
func (r *RuncConfig) Delete(id string, force bool) error
USAGE:
runc delete [command options] <container-id>
OPTIONS:
--force, -f Forcibly deletes the container if it is still running (uses SIGKILL)
func (*RuncConfig) Kill ¶
func (r *RuncConfig) Kill(id string, signal string, all bool) (err error)
USAGE:
runc kill [command options] <container-id> [signal]
OPTIONS:
--all, -a send the specified signal to all processes inside the container
func (*RuncConfig) List ¶
func (r *RuncConfig) List() (list []*api.Container, err error)
USAGE:
runc list [command options]
OPTIONS:
--format value, -f value select one of: table or json (default: "table") --quiet, -q display only container IDs
func (*RuncConfig) Pause ¶
func (r *RuncConfig) Pause(ID string) (err error)
USAGE:
runc pause <container-id>
func (*RuncConfig) Resume ¶
func (r *RuncConfig) Resume(ID string) (err error)
USAGE:
runc resume <container-id>
func (*RuncConfig) Run ¶
func (r *RuncConfig) Run(c *CreateOpts) error
USAGE:
runc run [command options] <container-id>
OPTIONS:
--bundle value, -b value path to the root of the bundle directory, defaults to the current directory --console-socket value path to an AF_UNIX socket which will receive a file descriptor referencing the master end of the console's pseudoterminal --detach, -d detach from the container's process --pid-file value specify the file to write the process id to --no-subreaper disable the use of the subreaper used to reap reparented processes --no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk --no-new-keyring do not create a new session keyring for the container. This will cause the container to inherit the calling processes session key --preserve-fds value Pass N additional file descriptors to the container (stdio + $LISTEN_FDS + N in total) (default: 0)
func (*RuncConfig) RunWithStdio ¶
func (r *RuncConfig) RunWithStdio(c *CreateOpts, stdout io.WriteCloser, stderr io.WriteCloser) error
func (*RuncConfig) Start ¶
func (r *RuncConfig) Start(id string) error
USAGE:
runc start <container-id>
func (*RuncConfig) State ¶
func (r *RuncConfig) State(id string) (container *api.Container, err error)
USAGE:
runc state <container-id>
func (*RuncConfig) UpdateResource ¶
func (r *RuncConfig) UpdateResource(u *UpdateResourceOpts) (err error)
type RuncContainerStatus ¶
type RuncContainerStatus = string
const ( ContainerStatusNotExist RuncContainerStatus = "not exists" // Created is the status that denotes the container exists but has not been run yet. ContainerStatusCreated RuncContainerStatus = "created" // Running is the status that denotes the container exists and is running. ContainerStatusRunning RuncContainerStatus = "running" // Pausing is the status that denotes the container exists, it is in the process of being paused. ContainerStatusPausing RuncContainerStatus = "pausing" // Paused is the status that denotes the container exists, but all its processes are paused. ContainerStatusPaused RuncContainerStatus = "paused" // Stopped is the status that denotes the container does not have a created or running process. ContainerStatusStopped RuncContainerStatus = "stopped" )
type RuncCtl ¶
type RuncCtl interface { Create(c *CreateOpts) error UpdateResource(u *UpdateResourceOpts) (err error) Start(id string) error Run(c *CreateOpts) error RunWithStdio(c *CreateOpts, stdout io.WriteCloser, stderr io.WriteCloser) error Delete(id string, force bool) error State(id string) (container *api.Container, err error) List() (list []*api.Container, err error) Kill(id string, signal string, all bool) (err error) Pause(ID string) (err error) Resume(ID string) (err error) }
type UpdateResourceOpts ¶
Click to show internal directories.
Click to hide internal directories.