builder

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageTitleLabel       = "org.opencontainers.image.title"
	ImageDescriptionLabel = "org.opencontainers.image.description"
	ImageCreatedLabel     = "org.opencontainers.image.created"
	ImageRefNameLabel     = "org.opencontainers.image.ref.name"
	ImageVersionLabel     = "org.opencontainers.image.version"
)

various standard oci labels

View Source
const DefaultBaseImage = "registry.access.redhat.com/ubi9/ubi-minimal:latest"

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryProvider

type BinaryProvider interface {
	ExtractServerBinary(platform *v1.Platform) ([]byte, fs.FileInfo, error)
}

BinaryProvider interface for accessing server binaries

type BuildOptions

type BuildOptions struct {
	Platform    *v1.Platform // Target platform (linux/amd64, etc.)
	BaseImage   string       // Base image reference
	MCPFilePath string       // path to the mcp file
	ImageTag    string       // output image tag
}

func (*BuildOptions) SetDefaults

func (o *BuildOptions) SetDefaults()

type DaemonImageSaver

type DaemonImageSaver struct{}

DaemonImageSaver implements ImageSaver for saving to local container engine

func (*DaemonImageSaver) SaveImage

func (d *DaemonImageSaver) SaveImage(ctx context.Context, img v1.Image, ref string) error

type DefaultImageDownloader

type DefaultImageDownloader struct{}

DefaultImageDownloader implements ImageDownloader using go-containerregistry

func (*DefaultImageDownloader) DownloadImage

func (d *DefaultImageDownloader) DownloadImage(ctx context.Context, baseImage string, platform *v1.Platform) (v1.Image, error)

type EmbedBinaryProvider

type EmbedBinaryProvider struct {
	// contains filtered or unexported fields
}

EmbedBinaryProvider implements BinaryProvider using embedded binaries

func (*EmbedBinaryProvider) ExtractServerBinary

func (bp *EmbedBinaryProvider) ExtractServerBinary(platform *v1.Platform) ([]byte, fs.FileInfo, error)

type FileSystem

type FileSystem interface {
	Stat(name string) (fs.FileInfo, error)
	ReadFile(name string) ([]byte, error)
}

FileSystem interface for file operations

type ImageBuilder

type ImageBuilder struct {
	// contains filtered or unexported fields
}

func New

func New(saveToRegistry bool) *ImageBuilder

func (*ImageBuilder) Build

func (b *ImageBuilder) Build(ctx context.Context, opts BuildOptions) (v1.Image, error)

func (*ImageBuilder) Save

func (b *ImageBuilder) Save(ctx context.Context, img v1.Image, ref string) error

type ImageDownloader

type ImageDownloader interface {
	DownloadImage(ctx context.Context, baseImage string, platform *v1.Platform) (v1.Image, error)
}

ImageDownloader interface for downloading base images

type ImageSaver

type ImageSaver interface {
	SaveImage(ctx context.Context, img v1.Image, ref string) error
}

ImageSaver interface for saving built images to different destinations

type OSFileSystem

type OSFileSystem struct{}

OSFileSystem implements FileSystem using the standard os package

func (*OSFileSystem) ReadFile

func (fs *OSFileSystem) ReadFile(name string) ([]byte, error)

func (*OSFileSystem) Stat

func (fs *OSFileSystem) Stat(name string) (fs.FileInfo, error)

type RegistryImageSaver

type RegistryImageSaver struct{}

RegistryImageSaver implements ImageSaver for pushing to container registries

func (*RegistryImageSaver) SaveImage

func (r *RegistryImageSaver) SaveImage(ctx context.Context, img v1.Image, ref string) error

Jump to

Keyboard shortcuts

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