spec

package
v0.0.0-...-9de8873 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package spec describes the Dockerfile data model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildStage

type BuildStage struct {
	Index     int         `json:"index"`
	StartLine int         `json:"start_line"`
	EndLine   int         `json:"end_line"`
	Name      string      `json:"name,omitempty"`
	Parent    ParentImage `json:"parent"`

	AllInstructions           []*instruction.Field            `json:"-"`
	CurrentInstructions       []*instruction.Field            `json:"-"`
	OnBuildInstructions       []*instruction.Field            `json:"-"`
	UnknownInstructions       []*instruction.Field            `json:"-"`
	InvalidInstructions       []*instruction.Field            `json:"-"` //not including unknown instructions
	CurrentInstructionsByType map[string][]*instruction.Field `json:"-"`
	FromInstruction           *instruction.Field              `json:"-"`
	ArgInstructions           []*instruction.Field            `json:"-"`
	EnvInstructions           []*instruction.Field            `json:"-"`

	EnvVars            map[string]string      `json:"-"`
	BuildArgs          map[string]string      `json:"-"`
	FromArgs           map[string]string      `json:"-"` //"FROM" ARGs used by the stage
	UnknownFromArgs    map[string]struct{}    `json:"-"`
	IsUsed             bool                   `json:"-"`
	StageReferences    map[string]*BuildStage `json:"-"`
	ExternalReferences map[string]struct{}    `json:"-"`
}

func NewBuildStage

func NewBuildStage() *BuildStage

type Dockerfile

type Dockerfile struct {
	Name                  string
	Location              string
	Lines                 []string
	FromArgs              map[string]string //all "FROM" ARGs
	Stages                []*BuildStage
	StagesByName          map[string]*BuildStage
	LastStage             *BuildStage
	StagelessInstructions []*instruction.Field
	ArgInstructions       []*instruction.Field
	AllInstructions       []*instruction.Field
	InstructionsByType    map[string][]*instruction.Field
	UnknownInstructions   []*instruction.Field
	InvalidInstructions   []*instruction.Field //not including unknown instructions
	Warnings              []string
}

func NewDockerfile

func NewDockerfile() *Dockerfile

type ParentImage

type ParentImage struct {
	Name           string      `json:"name,omitempty"`
	Tag            string      `json:"tag,omitempty"`
	Digest         string      `json:"digest,omitempty"`
	BuildArgAll    string      `json:"-"`
	BuildArgName   string      `json:"-"`
	BuildArgTag    string      `json:"-"`
	BuildArgDigest string      `json:"-"`
	HasEmptyName   bool        `json:"-"`
	HasEmptyTag    bool        `json:"-"`
	HasEmptyDigest bool        `json:"-"`
	ParentStage    *BuildStage `json:"-"`
}

Jump to

Keyboard shortcuts

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