description

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTag types.Tag = "latest"

DefaultTag is used if user specified empty tag list

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	// Execute executes build command
	Execute(build ImageBuild) error
}

Command is implemented by commands available in SpecFile

func From

func From(buildKey types.BuildKey) Command

From returns handler for FROM command

func Params

func Params(params ...string) Command

Params returns handler for PARAMS command

func Run

func Run(command string) Command

Run returns handler for RUN command

type Descriptor

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

Descriptor describes future image

func Describe

func Describe(name string, tags types.Tags, commands ...Command) *Descriptor

Describe creates descriptor for image

func (*Descriptor) Commands

func (d *Descriptor) Commands() []Command

Commands returns commands

func (*Descriptor) Name

func (d *Descriptor) Name() string

Name returns name of the image

func (*Descriptor) Tags

func (d *Descriptor) Tags() types.Tags

Tags returns tags of the image

type FromCommand

type FromCommand struct {
	BuildKey types.BuildKey
}

FromCommand executes FROM command

func (*FromCommand) Execute

func (cmd *FromCommand) Execute(build ImageBuild) error

Execute executes build command

type ImageBuild

type ImageBuild interface {
	// From executes FROM command
	From(cmd *FromCommand) error

	// Params executes PARAMS command
	Params(cmd *ParamsCommand) error

	// Run executes RUN command
	Run(cmd *RunCommand) error
}

ImageBuild represents build in progress

type ParamsCommand

type ParamsCommand struct {
	Params []string
}

ParamsCommand executes PARAMS command

func (*ParamsCommand) Execute

func (cmd *ParamsCommand) Execute(build ImageBuild) error

Execute executes build command

type RunCommand

type RunCommand struct {
	Command string
}

RunCommand executes RUN command

func (*RunCommand) Execute

func (cmd *RunCommand) Execute(build ImageBuild) error

Execute executes build command

Jump to

Keyboard shortcuts

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