dockerfile

package
v0.116.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.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 Dockerfile

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

Dockerfile defines a resource of kind "dockerfile"

func New

func New(spec interface{}) (*Dockerfile, error)

New returns a reference to a newly initialized Dockerfile object from a Spec or an error if the provided Spec triggers a validation error.

func (*Dockerfile) Changelog

func (df *Dockerfile) Changelog(from, to string) *result.Changelogs

Changelog returns the changelog for this resource, or an empty string if not supported

func (*Dockerfile) Condition

func (d *Dockerfile) Condition(_ context.Context, source string, scm scm.ScmHandler) (pass bool, message string, err error)

Condition test if the Dockerfile contains the correct key/value

func (*Dockerfile) ReportConfig added in v0.99.0

func (df *Dockerfile) ReportConfig() interface{}

ReportConfig returns a cleaned version of the configuration to identify the resource without any sensitive information or context specific data.

func (*Dockerfile) Source

func (df *Dockerfile) Source(_ context.Context, workingDir string, resultSource *result.Source) error

func (*Dockerfile) Target

func (d *Dockerfile) Target(_ context.Context, source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) (err error)

Target updates a targeted Dockerfile from source control management system

type Spec

type Spec struct {
	// file specifies the dockerimage file path to use and is incompatible with Files
	//
	// default: ""
	//
	// compatible:
	// 	* source
	// 	* condition
	// 	* target
	//
	//  remark:
	//    File is not compatible with Files. Only one of the two should be specified.
	File string `yaml:",omitempty"`
	// Files specifies the dockerimage file path(s) to use and is incompatible with File
	//
	// default: []
	//
	// compatible:
	// 	* source
	// 	* condition
	// 	* target
	//
	//  remark:
	//    Files is not compatible with File. Only one of the two should be specified.
	Files []string `yaml:",omitempty"`
	// Instruction specifies a DockerImage instruction such as ENV
	// Instruction can be specified as a simple string or as a map with keyword and matcher keys.
	//
	// compatible:
	// 	* source
	// 	* condition
	// 	* target
	//
	//  default: empty
	//
	//  example:
	//  “`yaml
	//  instruction:
	//    keyword: "FROM"
	//    matcher: "alpine"
	//  “`
	Instruction types.Instruction `yaml:"instruction,omitempty"`
	// Value specifies the value for a specified Dockerfile instruction.
	//
	// compatible:
	// 	* source
	// 	* condition
	// 	* target
	//
	// default: source output
	Value string `yaml:"value,omitempty"`
	// Stage can be used to further refined the scope
	// For Sources:
	// - If not defined, the last stage will be considered
	// For Condition and Targets:
	// - If not defined, all stages will be considered
	Stage string `yaml:"stage,omitempty"`
}

Spec defines a specification for a "dockerfile" resource parsed from an updatecli manifest file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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