images

package
v0.5.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ImageMinimal = "minimal"
	ImageScratch = "scratch"
)
View Source
const (
	Netapi32DllFilename        = `C:\Windows\System32\netapi32.dll`
	ImageContainingNetapi32Dll = "mcr.microsoft.com/windows/servercore:ltsc2022"
)

Variables

View Source
var (
	DefaultDependenciesCacheDirectory = filepath.Join(".cache", "dependencies", "images")
)

Functions

This section is empty.

Types

type BufferedLayer

type BufferedLayer struct {
	Layer v1.Layer
	// contains filtered or unexported fields
}

func NewTarLayer

func NewTarLayer(from iter.Seq2[LayerItem, error], opts LayerOpts) (*BufferedLayer, error)

func (*BufferedLayer) Close

func (this *BufferedLayer) Close() error

type BuildRequest

type BuildRequest struct {
	From   string
	Os     sys.Os
	Arch   sys.Arch
	Time   time.Time
	Vendor string

	PathEnv      []string
	Env          sys.EnvVars
	EntryPoint   []string
	Cmd          []string
	ExposedPorts map[string]struct{}
	Annotations  map[string]string
	Labels       map[string]string

	Contents               iter.Seq2[LayerItem, error]
	BifroestBinarySource   string
	BifroestBinarySourceFs fs.FS
	AddDummyConfiguration  bool
	AddSkeletonStructure   bool
}

func (BuildRequest) ToOciPlatform

func (this BuildRequest) ToOciPlatform() (*v1.Platform, error)

type Dependencies

type Dependencies struct {
	CacheDirectory       string
	AlwaysRefresh        bool
	ImageWithNetapi32Dll string
}

type FetchDependenciesRequest

type FetchDependenciesRequest struct {
	Os   sys.Os
	Arch sys.Arch

	CacheDirectory       string
	AlwaysRefresh        bool
	ImageWithNetapi32Dll string
}

type FileDependencies

type FileDependencies []FileDependency

func FetchDependencies

func FetchDependencies(ctx context.Context, req FetchDependenciesRequest) (result FileDependencies, err error)

func (FileDependencies) ToLayerItems

func (this FileDependencies) ToLayerItems() []LayerItem

type FileDependency

type FileDependency struct {
	Os     sys.Os
	Arch   sys.Arch
	Source string
	Target string
	Mode   gos.FileMode
}

func (FileDependency) ToLayerItem

func (this FileDependency) ToLayerItem() LayerItem

type Image

type Image interface {
	v1.Image
	io.Closer
}

func Build

func Build(ctx context.Context, req BuildRequest) (Image, error)

type LayerItem

type LayerItem struct {
	SourceFs   fs.FS
	SourceFile string
	TargetFile string
	Mode       gos.FileMode
}

type LayerOpts

type LayerOpts struct {
	Os   sys.Os
	Id   string
	Time time.Time
}

Jump to

Keyboard shortcuts

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