Documentation ¶
Index ¶
- Variables
- func Build(cmd *cobra.Command, args []string) error
- func DisplayVersion(cmd *cobra.Command, args []string) error
- func Doctor(cmd *cobra.Command, args []string) error
- func Exec(ctrDigest string, args []string, detach bool) error
- func FullVersion() string
- func Images(_ *cobra.Command, _ []string) error
- func Init(ctr *container.Container, args []string, detach bool) error
- func Ps(cmd *cobra.Command, _ []string) error
- func Pull(cmd *cobra.Command, args []string) error
- func Rm(force bool, args ...string) error
- func Rmi(cmd *cobra.Command, args []string) error
- func Run(copts *ContainerOptions) error
- func Stop(kill bool, args ...string) error
- type ContainerOptions
Constants ¶
This section is empty.
Variables ¶
var ( // Version release version Version = "0.0.0" // Commit will be overwritten automatically by the build system Commit = "HEAD" )
Functions ¶
func Build ¶
Build builds an image.
It asks for a path or url or reads from stadnard input and an optional tag to name the image.
func Exec ¶
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 Init ¶
Init will called by Run. It is a hack to fork a whole new Go process inside a new namespace.
If detach was enabled function returns immediately after starting the command and never waits for the result
func Rm ¶
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.
Types ¶
type ContainerOptions ¶
type ContainerOptions struct { Detach bool Env utils.ListOpts Entrypoint string IP string Hostname string Memory utils.MemBytes Swap utils.MemSwapBytes Name string Pids int64 Publish utils.ListOpts AutoRemove bool User string Volumes utils.ListOpts WorkDir string Image string Args []string }
func NewContainerOptions ¶
func NewContainerOptions() *ContainerOptions