container

package
v0.4.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 19 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)
	Stat(containerID, name string) (fs.FileInfo, error)
}

ContainerEngine defines interface to manage containers

func GetContainerEngine

func GetContainerEngine() ContainerEngine

GetContainerEngine gets a working container engine

type FileInfo added in v0.3.2

type FileInfo struct {
	// contains filtered or unexported fields
}

FileInfo implements fs.FileInfo interface

func (*FileInfo) IsDir added in v0.3.2

func (f *FileInfo) IsDir() bool

IsDir implements fs.FileInfo interface

func (*FileInfo) ModTime added in v0.3.2

func (f *FileInfo) ModTime() time.Time

ModTime implements fs.FileInfo interface

func (*FileInfo) Mode added in v0.3.2

func (f *FileInfo) Mode() fs.FileMode

Mode implements fs.FileInfo interface

func (*FileInfo) Name added in v0.3.2

func (f *FileInfo) Name() string

Name implements fs.FileInfo interface

func (*FileInfo) Size added in v0.3.2

func (f *FileInfo) Size() int64

Size implements fs.FileInfo interface

func (*FileInfo) Sys added in v0.3.2

func (f *FileInfo) Sys() interface{}

Sys implements fs.FileInfo interface

Jump to

Keyboard shortcuts

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