repository

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: MIT Imports: 30 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultContainerdSocketLocation The location to the containerd socket.
	DefaultContainerdSocketLocation = "/var/run/containerd/containerd.sock"
)

Functions

This section is empty.

Types

type ContainerConfig

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

ContainerConfig configuration about how to run the container

type Image

type Image struct {
	Name      string
	Tag       string
	CreatedAt time.Time
}

Image An image fetched from the repository.

type Session

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

Session An object that represent a session to a containerd runtime.

func NewSession

func NewSession(containerdSocket string) (*Session, error)

NewSession creates a new session

func (*Session) BuildRecipe

func (session *Session) BuildRecipe(ctx context.Context, recipe recipes.Recipe, tag string, imagePrefix string, env []string) (reference.ImageRef, error)

BuildRecipe Builds a recipe.

func (*Session) Close

func (session *Session) Close() error

Close Closes the session.

func (*Session) ExtractImage

func (session *Session) ExtractImage(ctx context.Context, imageRef reference.ImageRef, destination string) error

ExtractImage Extracts an image (with tag) to a specified directory

func (*Session) GetImages

func (session *Session) GetImages(ctx context.Context) ([]Image, error)

GetImages Get all the built images.

func (*Session) Pull

func (session *Session) Pull(ctx context.Context, imageRef reference.ImageRef, resolver remotes.Resolver) error

Pull Pulls an image locally.

func (*Session) Push

func (session *Session) Push(ctx context.Context, imageRef reference.ImageRef, resolver remotes.Resolver) error

Push Push an image remotely.

func (*Session) RemoveImage

func (session *Session) RemoveImage(ctx context.Context, image string) error

RemoveImage Removes an image locally.

func (*Session) RunContainer

func (session *Session) RunContainer(ctx context.Context, config ContainerConfig) error

RunContainer Runs a container

func (*Session) TagImage

func (session *Session) TagImage(ctx context.Context, source, destination reference.ImageRef) error

TagImage Tag an image.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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