cdimage

package
v0.1.5-alpha Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package cdimage is the containerd-backed implementation of image.Store. It pulls user images via containerd, injects the hpcc pause binary as a fresh top layer, and registers the prepared variant under a synthetic "prepared.hpcc.local/img:<digest>" name.

This is the path used on Windows under hcsshim's Hyper-V isolation; the Linux raw-Firecracker driver uses image/rootfs instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreparedImageName

func PreparedImageName(userDigest string) string

PreparedImageName returns the containerd image-record name under which a prepared image (pause-binary injected) is registered for a given user-supplied image digest. Exported so the Windows runtime can resolve a prepared image by user digest without re-implementing the naming convention.

Types

type PauseBinaries

type PauseBinaries struct {
	LinuxAmd64   string
	LinuxArm64   string
	WindowsAmd64 string
}

PauseBinaries lists the host filesystem paths of the per-platform pause binaries the worker has built (or shipped). The Store reads from these when constructing the injected layer for a prepared image.

type Store

type Store struct {
	Pause       PauseBinaries
	Client      *containerd.Client
	Snapshotter string
}

Store implements image.Store on top of containerd. The zero value is not valid — callers must set Client; Pause must cover every platform for which images are pulled. Snapshotter pins the containerd snapshotter that the base pull and the prepared-image unpack both flow into (empty falls back to containerd's daemon default — "overlayfs" on Linux, "windows" on Windows). Pinning matters because the worker's runtime later creates a snapshot under that same snapshotter; if the prepared image was unpacked elsewhere the runtime gets "parent snapshot ... does not exist" at container create time.

func (*Store) GetExistingImages

func (s *Store) GetExistingImages(ctx context.Context) ([]string, error)

func (*Store) PullImage

func (s *Store) PullImage(ctx context.Context, imagePath string, expectedDigest string) error

func (*Store) UntagImage

func (s *Store) UntagImage(ctx context.Context, userDigest string) error

Jump to

Keyboard shortcuts

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