internal

package
v0.0.0-...-72e9078 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version release version
	Version = "0.0.1"

	// Commit will be overwritten automatically by the build system
	Commit = "HEAD"
)

Functions

func DisplayVersion

func DisplayVersion(_ *cobra.Command, _ []string) error

DisplayVersion displays the version of box and exits

func Exec

func Exec(ctrDigest string, args []string, detach bool) error

Exec runs a command inside an existing container.

It asks for container digest, command and arg to run, and a detach bool. Container digest can be a prefix of digest.

If detach is true, Exec never wait for command to get done and returns.

func Fork

func Fork(ctr *container.Container, args []string, detach bool) error

Fork will call by Run. It is a hack to fork a whole new Go process inside a new namespace.

If detach was enable function returns immediately after starting the command and never wait for result

func FullVersion

func FullVersion() string

FullVersion returns the full version, build and commit hash

func Images

func Images(_ *cobra.Command, _ []string) error

Images gets all available local images and prints them.

func Ps

func Ps(cmd *cobra.Command, _ []string) error

Ps gets all running containers and prints them.

func Pull

func Pull(cmd *cobra.Command, args []string) error

Pull pulls an OCI compatible image from a registry

func Rm

func Rm(force bool, args ...string) error

Rm removes an existing container.

It asks for container digest of a container to remove, and a force bool. Container digest can be a prefix of digest.

If force is true, Rm kills the container before removing it.

func Rmi

func Rmi(cmd *cobra.Command, args []string) error

Rmi removes local images.

It asks for an image name or id to remove.

func Run

func Run(cmd *cobra.Command, args []string) error

Run runs a command inside a new container.

func Stop

func Stop(kill bool, args ...string) error

Stop stops a running container.

It asks for container digest of a container to stop, and kill bool to optionally kill the container.

Container digest can be a prefix of digest.

If kill is true, Stop kills the container.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL