container

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDisabled

func IsDisabled() bool

IsDisabled returns whether the container environment is disabled

Types

type ContainerEngine

type ContainerEngine interface {
	// RunCmdInContainer runs a container
	RunCmdInContainer(image string, cmd environmenttypes.Command, workingdir string, env []string) (stdout, stderr string, exitcode int, err error)
	// InspectImage gets Inspect output for a container
	InspectImage(image string) (dockertypes.ImageInspect, error)
	// TODO: Change paths from map to array
	CopyDirsIntoImage(image, newImageName string, paths map[string]string) (err error)
	CopyDirsIntoContainer(containerID string, paths map[string]string) (err error)
	CopyDirsFromContainer(containerID string, paths map[string]string) (err error)
	BuildImage(image, context, dockerfile string) (err error)
	RemoveImage(image string) (err error)
	CreateContainer(image string) (containerid string, err error)
	StopAndRemoveContainer(containerID string) (err error)
	// RunContainer runs a container from an image
	RunContainer(image string, cmd environmenttypes.Command, volsrc string, voldest string) (output string, containerStarted bool, err error)
}

ContainerEngine defines interface to manage containers

func GetContainerEngine

func GetContainerEngine() ContainerEngine

GetContainerEngine gets a working container engine

Jump to

Keyboard shortcuts

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