image

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildArg

type BuildArg struct {
	// Name is the name of the build argument
	Name string
	// Value is the value of the build argument
	Value string
	// Location is the RUN line in which the build argument was found
	Location string
}

BuildArg represents a build argument that has be parsed out of a RUN step.

type EnvVar

type EnvVar struct {
	// Name is the name of the environment variable
	Name string
	// Value is the full value of the variable
	Value string
	// Location is the line it was defined
	Location string
}

EnvVar represents a set environment variable during build time

type Image

type Image interface {
	// ParseEnvVars will search an images configuration for all
	// set environment variables and return a list of EnvVar representing
	// the set environment variables
	ParseEnvVars() ([]EnvVar, error)
	// ParseBuildArguments will parse an images history for all set build args
	// during run commands and return a list of BuildArg representing the
	// discovered build arguments
	ParseBuildArguments() ([]BuildArg, error)
	// Pull will pull down an image from remote
	Pull() error

	// CreateContainer will start a container from this image
	CreateContainer() (container.Container, error)

	// DestroyContainer will remove a container from the docker daemon
	DestroyContainer(container.Container) error
}

Image represents a built docker image

func NewImage

func NewImage(name string) (Image, error)

NewImage connects to the docker daemon and constructs a new Image from its reference

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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