builder

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, opts BuildOpts, c *client.Client) ([]*imagespec.Image, error)

Build a unikraft image based on the provided build options.

func BuildKernel

func BuildKernel(ctx context.Context, opts BuildOpts) ([]*imagespec.Image, error)

func BuildRootfs

func BuildRootfs(ctx context.Context, c *client.Client, opts BuildOpts) (_ []*imagespec.Image, rerr error)

func CreateSSH

func CreateSSH(ssh []*SSH) (session.Attachable, error)

func CreateSecrets

func CreateSecrets(secrets []*Secret) (session.Attachable, error)

Types

type BuildOpts

type BuildOpts struct {
	Rootfs RootfsOpts

	Runtime string

	Platform []ocispec.Platform

	Cmd    []string
	Env    kraftfile.Map
	Labels map[string]string
}

func KraftfileToBuildOpts

func KraftfileToBuildOpts(dir string, kf *kraftfile.Kraftfile) (BuildOpts, error)

type Rootfs

type Rootfs struct {
	File *os.File
}

type RootfsOpts

type RootfsOpts struct {
	Path string

	// Output params
	Format     kraftfile.FsType
	Compress   bool
	KeepOwners bool

	// Buildkit params
	// Dockerfile string
	BuildArg []string
	Target   string
	Secrets  []*Secret
	SSH      []*SSH

	NoCache bool
}

type RootfsType

type RootfsType string
const (
	RootfsTypeDockerfile RootfsType = "dockerfile"
)

type SSH

type SSH struct {
	ID    string
	Paths []string
}

func ParseSSHSpecs

func ParseSSHSpecs(sl []string) ([]*SSH, error)

func (*SSH) UnmarshalText

func (s *SSH) UnmarshalText(text []byte) error

type Secret

type Secret struct {
	ID       string
	FilePath string
	Env      string
}

func ParseSecretSpecs

func ParseSecretSpecs(sl []string) ([]*Secret, error)

func (*Secret) UnmarshalText

func (s *Secret) UnmarshalText(text []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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