dockerfile

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetRemoteOnBuild = getRemoteOnBuild
)

Functions

func MakeKanikoStages

func MakeKanikoStages(opts *config.KanikoOptions, stages []instructions.Stage, metaArgs []instructions.ArgCommand) ([]config.KanikoStage, error)

func Parse

Parse parses the contents of a Dockerfile and returns a list of commands

func ParseCommands

func ParseCommands(cmdArray []string) ([]instructions.Command, error)

ParseCommands parses an array of commands into an array of instructions.Command; used for onbuild

Types

type BuildArgs

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

BuildArgs manages arguments used by the builder

func NewBuildArgs

func NewBuildArgs(args []string) *BuildArgs

func (*BuildArgs) AddArg

func (b *BuildArgs) AddArg(key string, value *string)

AddArg adds a new arg that can be used by directives

func (*BuildArgs) AddMetaArgs

func (b *BuildArgs) AddMetaArgs(metaArgs []instructions.ArgCommand)

AddMetaArgs adds the supplied args map to b's allowedMetaArgs

func (*BuildArgs) Clone

func (b *BuildArgs) Clone() *BuildArgs

Clone returns a copy of the BuildArgs type

func (*BuildArgs) FilterAllowed

func (b *BuildArgs) FilterAllowed(filter []string) []string

FilterAllowed returns all allowed args without the filtered args

func (*BuildArgs) GetAllAllowed

func (b *BuildArgs) GetAllAllowed() map[string]string

GetAllAllowed returns a mapping with all the allowed args

func (*BuildArgs) GetAllMeta

func (b *BuildArgs) GetAllMeta() map[string]string

GetAllMeta returns a mapping with all the meta args

func (*BuildArgs) InitPredefinedArgs

func (b *BuildArgs) InitPredefinedArgs(customPlatform string, lastStage string) error

Initialize predefined build args s.a.: TARGETOS, TARGETARCH, BUILDPLATFORM, TARGETPLATFORM ...

func (*BuildArgs) ReplacementEnvs

func (b *BuildArgs) ReplacementEnvs(envs []string) []string

ReplacementEnvs returns a list of filtered environment variables

Jump to

Keyboard shortcuts

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