Documentation
¶
Overview ¶
Package imagepreparation prepares neutral caches, never installed stacks.
Index ¶
Constants ¶
View Source
const ManifestName = "neutral-image.json"
Variables ¶
View Source
var ErrAdmissionMismatch = errors.New("neutral image admission mismatch")
View Source
var ErrNotNeutral = errors.New("image roots contain state that cannot be cloned")
Functions ¶
func CleanTarget ¶
CleanTarget refuses every existing entry, including foreign custody nested beneath arbitrary directories. Preparation never scrubs an initialized host.
func FileDigest ¶
Types ¶
type ContainerCache ¶
type LocalDocker ¶
type LocalDocker struct{ Config string }
LocalDocker always addresses the local Unix socket with an empty config. Contexts, DOCKER_HOST and user registry credentials cannot redirect a bake.
type Manifest ¶
type Manifest struct {
SchemaVersion string `json:"schemaVersion"`
Profile Profile `json:"profile"`
Platform Platform `json:"platform"`
Release Release `json:"release"`
Binaries map[string]string `json:"binaries"`
ProviderFiles map[string]string `json:"providerFiles"`
}
func Prepare ¶
Prepare downloads the current exact attested release into the neutral cache, verifies the actual packaged tools, and only pulls immutable container images.
func ReadManifest ¶
type Options ¶
type Options struct {
CacheRoot string
Target string
Executable string
Version string
Installer releaseindex.Installer
Docker ContainerCache
// Host observation is injectable only for package tests. The CLI always
// supplies ObserveHost and LocalDocker; manifests never supply these facts.
ObserveHost func() (Platform, error)
}
type Platform ¶
type Platform struct {
OS string `json:"os"`
Arch string `json:"arch"`
Distribution string `json:"distribution"`
Version string `json:"version"`
}
func ObserveHost ¶
type Profile ¶
type Profile struct {
ID string `json:"id"`
Kit string `json:"kit"`
Module string `json:"module"`
DefaultOS string `json:"defaultOS"`
CompatibleOS []string `json:"compatibleOS"`
Architectures []string `json:"architectures"`
Runtime string `json:"runtime"`
ManagedTarget string `json:"managedTarget"`
CacheScope string `json:"cacheScope"`
NetworkRequired bool `json:"networkRequired"`
Images []Image `json:"images"`
}
Click to show internal directories.
Click to hide internal directories.