buildkitutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDockerfileName is the Default filename, read by nerdctl build
	DefaultDockerfileName string = "Dockerfile"
	ContainerfileName     string = "Containerfile"

	TempDockerfileName string = "docker-build-tempdockerfile-"
)

Variables

This section is empty.

Functions

func BuildKitFile added in v0.22.0

func BuildKitFile(dir, inputfile string) (absDir string, file string, err error)

Buildkit file returns the values for the following buildctl args --localfilename=dockerfile={absDir} --opt=filename={file}

func BuildctlBaseArgs

func BuildctlBaseArgs(buildkitHost string) []string

func BuildctlBinary

func BuildctlBinary() (string, error)

func GetBuildkitHost added in v0.18.0

func GetBuildkitHost(namespace string) (string, error)

func GetWorkerLabels added in v0.18.0

func GetWorkerLabels(buildkitHost string) (labels map[string]string, _ error)

func PingBKDaemon

func PingBKDaemon(buildkitHost string) error

func WriteTempDockerfile added in v0.13.0

func WriteTempDockerfile(rc io.Reader) (dockerfileDir string, err error)

WriteTempDockerfile is from https://github.com/docker/cli/blob/v20.10.9/cli/command/image/build/context.go#L118

Types

type UsageInfo added in v1.2.0

type UsageInfo struct {
	ID      string `json:"id"`
	Mutable bool   `json:"mutable"`
	InUse   bool   `json:"inUse"`
	Size    int64  `json:"size"`

	CreatedAt   time.Time       `json:"createdAt"`
	LastUsedAt  *time.Time      `json:"lastUsedAt"`
	UsageCount  int             `json:"usageCount"`
	Parents     []string        `json:"parents"`
	Description string          `json:"description"`
	RecordType  UsageRecordType `json:"recordType"`
	Shared      bool            `json:"shared"`
}

UsageInfo is from https://github.com/moby/buildkit/blob/v0.11.0/client/diskusage.go#L12-L25

type UsageRecordType added in v1.2.0

type UsageRecordType string

UsageRecordType is from https://github.com/moby/buildkit/blob/v0.11.0/client/diskusage.go#L75

Jump to

Keyboard shortcuts

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