frontendmockerfile

package
v0.0.0-...-aa820ee Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalNameContext    = "context"
	LocalNameDockerfile = "dockerfile"
)

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, c client.Client) (*client.Result, error)

Types

type Config

type Config struct {
	ApiVersion string        `yaml:"apiVersion"`
	Images     []ConfigImage `yaml:"images"`
}

func GetMockerfileConfig

func GetMockerfileConfig(ctx context.Context, c client.Client) (*Config, error)

func NewFromBytes

func NewFromBytes(b []byte) (*Config, error)

func NewFromFile

func NewFromFile(filename string) (*Config, error)

type ConfigImage

type ConfigImage struct {
	From   string `yaml:"from"`
	Parent string `yaml:"parent"`

	External []*ExternalFile `yaml:"external"`

	WorkDir string   `yaml:"workdir"`
	Steps   []string `yaml:"steps"`
	Output  []string `yaml:"output"`

	Package *Package `yaml:"package"`
}

type ExternalFile

type ExternalFile struct {
	Source      string `yaml:"src"`
	Destination string `yaml:"dst"`
	Sha256      string `yaml:"sha256"`

	Install []string `yaml:"install"`
}

type HealthConfig

type HealthConfig struct {
	Test []string `json:",omitempty"`

	Interval    time.Duration `json:",omitempty"`
	Timeout     time.Duration `json:",omitempty"`
	StartPeriod time.Duration `json:"omitempty"`

	Retries int `json:",omitempty"`
}

type Image

type Image struct {
	specs.Image

	Config ImageConfig `json:"config,omitempty"`
}

func Mockerfile2LLB

func Mockerfile2LLB(c *Config) (llb.State, *Image)

func NewImageConfig

func NewImageConfig(c *Config) *Image

type ImageConfig

type ImageConfig struct {
	specs.ImageConfig

	Healthcheck *HealthConfig `json:",omitempty"`
	ArgsEscaped bool          `json:",omitempty"`

	OnBuild     []string
	StopTimeout *int              `json:",omitempty"`
	Shell       strslice.StrSlice `json:",omitempty"`
}

type Package

type Package struct {
	Repo    []string `yaml:"repo"`
	Gpg     []string `yaml:"gpg"`
	Install []string `yaml:"install"`
}

Jump to

Keyboard shortcuts

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