dockerfile

package
v1.25.23 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildArgs

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

BuildArgs manages arguments used by the builder

func NewBuildArgs

func NewBuildArgs(argsFromOptions map[string]*string) *BuildArgs

NewBuildArgs creates a new BuildArgs type

func (*BuildArgs) AddArg

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

AddArg adds a new arg that can be used by directives

func (*BuildArgs) AddMetaArg

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

AddMetaArg adds a new meta arg that can be used by FROM directives

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) IsReferencedOrNotBuiltin

func (b *BuildArgs) IsReferencedOrNotBuiltin(key string) bool

IsReferencedOrNotBuiltin checks if the key is a built-in arg, or if it has been referenced by the Dockerfile. Returns true if the arg is not a builtin or if the builtin has been referenced in the Dockerfile.

func (*BuildArgs) MergeReferencedArgs

func (b *BuildArgs) MergeReferencedArgs(other *BuildArgs)

MergeReferencedArgs merges referenced args from another BuildArgs object into the current one

func (*BuildArgs) ResetAllowed

func (b *BuildArgs) ResetAllowed()

ResetAllowed clears the list of args that are allowed to be used by a directive

func (*BuildArgs) WarnOnUnusedBuildArgs

func (b *BuildArgs) WarnOnUnusedBuildArgs(out io.Writer)

WarnOnUnusedBuildArgs checks if there are any leftover build-args that were passed but not consumed during build. Print a warning, if there are any.

Jump to

Keyboard shortcuts

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