dockerfile

package
v1.2.330 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeCopyAddSourcesForPathMatcher added in v1.2.185

func NormalizeCopyAddSourcesForPathMatcher(wildcards []string) []string

func SetupDockerfileStagesDependencies added in v1.2.181

func SetupDockerfileStagesDependencies(stages []*DockerfileStage) error

Types

type Dockerfile

type Dockerfile struct {
	DockerfileOptions

	DockerfileID string
	Stages       []*DockerfileStage
}

func NewDockerfile

func NewDockerfile(dockerfileID string, stages []*DockerfileStage, opts DockerfileOptions) *Dockerfile

func (*Dockerfile) FindStage added in v1.2.184

func (df *Dockerfile) FindStage(name string) *DockerfileStage

func (*Dockerfile) GetTargetStage added in v1.2.184

func (df *Dockerfile) GetTargetStage() (*DockerfileStage, error)

type DockerfileOptions added in v1.2.178

type DockerfileOptions struct {
	Target               string
	BuildArgs            map[string]string
	DependenciesArgsKeys []string
	AddHost              []string
	Network              string
	SSH                  string
}

type DockerfileStage

type DockerfileStage struct {
	Dockerfile      *Dockerfile
	Dependencies    []*DockerfileStage
	BaseStage       *DockerfileStage
	ExpanderFactory ExpanderFactory

	BaseName      string
	Index         int
	StageName     string
	WerfImageName string
	Platform      string
	Instructions  []DockerfileStageInstructionInterface
}

func NewDockerfileStage

func NewDockerfileStage(index int, baseName, stageName, werfImageName string, instructions []DockerfileStageInstructionInterface, platform string, expanderFactory ExpanderFactory) *DockerfileStage

func (*DockerfileStage) AppendDependencyStage added in v1.2.184

func (stage *DockerfileStage) AppendDependencyStage(dep *DockerfileStage)

func (*DockerfileStage) GetWerfImageName added in v1.2.200

func (stage *DockerfileStage) GetWerfImageName() string

func (*DockerfileStage) HasStageName added in v1.2.181

func (stage *DockerfileStage) HasStageName() bool

func (*DockerfileStage) LogName added in v1.2.181

func (stage *DockerfileStage) LogName() string

type DockerfileStageInstruction added in v1.2.184

type DockerfileStageInstruction[T InstructionDataInterface] struct {
	Data                   T
	Env                    map[string]string
	DependenciesByStageRef map[string]*DockerfileStage
	ExpanderFactory        ExpanderFactory
}

func NewDockerfileStageInstruction added in v1.2.184

func NewDockerfileStageInstruction[T InstructionDataInterface](data T, opts DockerfileStageInstructionOptions) *DockerfileStageInstruction[T]

func (*DockerfileStageInstruction[T]) Expand added in v1.2.186

func (i *DockerfileStageInstruction[T]) Expand(env map[string]string, opts ExpandOptions) error

func (*DockerfileStageInstruction[T]) ExpandEnv added in v1.2.198

func (i *DockerfileStageInstruction[T]) ExpandEnv(baseEnv map[string]string, opts ExpandOptions) (map[string]string, error)

func (*DockerfileStageInstruction[T]) GetDependenciesByStageRef added in v1.2.184

func (i *DockerfileStageInstruction[T]) GetDependenciesByStageRef() map[string]*DockerfileStage

func (*DockerfileStageInstruction[T]) GetDependencyByStageRef added in v1.2.184

func (i *DockerfileStageInstruction[T]) GetDependencyByStageRef(ref string) *DockerfileStage

func (*DockerfileStageInstruction[T]) GetInstructionData added in v1.2.184

func (i *DockerfileStageInstruction[T]) GetInstructionData() InstructionDataInterface

func (*DockerfileStageInstruction[T]) SetDependencyByStageRef added in v1.2.184

func (i *DockerfileStageInstruction[T]) SetDependencyByStageRef(ref string, dep *DockerfileStage)

func (*DockerfileStageInstruction[T]) SetEnvVar added in v1.2.198

func (i *DockerfileStageInstruction[T]) SetEnvVar(key, value string)

type DockerfileStageInstructionInterface added in v1.2.184

type DockerfileStageInstructionInterface interface {
	SetDependencyByStageRef(ref string, dep *DockerfileStage)
	GetDependencyByStageRef(ref string) *DockerfileStage
	GetDependenciesByStageRef() map[string]*DockerfileStage
	GetInstructionData() InstructionDataInterface
	ExpandEnv(baseEnv map[string]string, opts ExpandOptions) (map[string]string, error)
	Expand(env map[string]string, opts ExpandOptions) error
}

type DockerfileStageInstructionOptions added in v1.2.186

type DockerfileStageInstructionOptions struct {
	Env             map[string]string
	ExpanderFactory ExpanderFactory
}

type ExpandOptions added in v1.2.188

type ExpandOptions struct {
	SkipUnsetEnv bool
}

type Expander added in v1.2.186

type Expander interface {
	ProcessWordWithMap(word string, env map[string]string) (string, error)
	ProcessWordsWithMap(word string, env map[string]string) ([]string, error)
}

type ExpanderFactory added in v1.2.188

type ExpanderFactory interface {
	GetExpander(opts ExpandOptions) Expander
}

type InstructionDataInterface added in v1.2.184

type InstructionDataInterface interface {
	Name() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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