package containerimage
import "github.com/moby/buildkit/exporter/containerimage"
Index ¶
- func New(opt Opt) (exporter.Exporter, error)
- func NewDescriptorReference(desc ocispecs.Descriptor, release func(context.Context) error) exporter.DescriptorReference
- func RemoveInternalLayerAnnotations(in map[string]string, oci bool) map[string]string
- type Annotations
- type AnnotationsGroup
- func ParseAnnotations(data map[string][]byte) (AnnotationsGroup, map[string][]byte, error)
- func (ag AnnotationsGroup) Merge(other AnnotationsGroup) AnnotationsGroup
- func (ag AnnotationsGroup) Platform(p *ocispecs.Platform) *Annotations
- type ImageCommitOpts
- func (c *ImageCommitOpts) EnableForceCompression(ctx context.Context, reason string)
- func (c *ImageCommitOpts) EnableOCITypes(ctx context.Context, reason string)
- func (c *ImageCommitOpts) Load(ctx context.Context, opt map[string]string) (map[string]string, error)
- type ImageWriter
- func NewImageWriter(opt WriterOpt) (*ImageWriter, error)
- func (ic *ImageWriter) Applier() diff.Applier
- func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, sessionID string, inlineCache exptypes.InlineCache, opts *ImageCommitOpts) (*ocispecs.Descriptor, error)
- func (ic *ImageWriter) ContentStore() content.Store
- func (ic *ImageWriter) Snapshotter() snapshot.Snapshotter
- type Opt
- type WriterOpt
Functions ¶
func New ¶
New returns a new containerimage exporter instance that supports exporting to an image store and pushing the image to registry. This exporter supports following values in returned kv map: - containerimage.digest - The digest of the root manifest for the image.
func NewDescriptorReference ¶
func NewDescriptorReference(desc ocispecs.Descriptor, release func(context.Context) error) exporter.DescriptorReference
func RemoveInternalLayerAnnotations ¶
Types ¶
type Annotations ¶
type Annotations struct { Index map[string]string IndexDescriptor map[string]string Manifest map[string]string ManifestDescriptor map[string]string }
type AnnotationsGroup ¶
type AnnotationsGroup map[string]*Annotations
AnnotationsGroup is a map of annotations keyed by the reference key
func ParseAnnotations ¶
func (AnnotationsGroup) Merge ¶
func (ag AnnotationsGroup) Merge(other AnnotationsGroup) AnnotationsGroup
func (AnnotationsGroup) Platform ¶
func (ag AnnotationsGroup) Platform(p *ocispecs.Platform) *Annotations
type ImageCommitOpts ¶
type ImageCommitOpts struct { ImageName string RefCfg cacheconfig.RefConfig OCITypes bool OCIArtifact bool Annotations AnnotationsGroup Epoch *time.Time ForceInlineAttestations bool // force inline attestations to be attached RewriteTimestamp bool // rewrite timestamps in layers to match the epoch }
func (*ImageCommitOpts) EnableForceCompression ¶
func (c *ImageCommitOpts) EnableForceCompression(ctx context.Context, reason string)
func (*ImageCommitOpts) EnableOCITypes ¶
func (c *ImageCommitOpts) EnableOCITypes(ctx context.Context, reason string)
func (*ImageCommitOpts) Load ¶
func (c *ImageCommitOpts) Load(ctx context.Context, opt map[string]string) (map[string]string, error)
type ImageWriter ¶
type ImageWriter struct {
// contains filtered or unexported fields
}
func NewImageWriter ¶
func NewImageWriter(opt WriterOpt) (*ImageWriter, error)
func (*ImageWriter) Applier ¶
func (ic *ImageWriter) Applier() diff.Applier
func (*ImageWriter) Commit ¶
func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, sessionID string, inlineCache exptypes.InlineCache, opts *ImageCommitOpts) (*ocispecs.Descriptor, error)
func (*ImageWriter) ContentStore ¶
func (ic *ImageWriter) ContentStore() content.Store
func (*ImageWriter) Snapshotter ¶
func (ic *ImageWriter) Snapshotter() snapshot.Snapshotter
type Opt ¶
type Opt struct { SessionManager *session.Manager ImageWriter *ImageWriter Images images.Store RegistryHosts docker.RegistryHosts LeaseManager leases.Manager }
type WriterOpt ¶
type WriterOpt struct { Snapshotter snapshot.Snapshotter ContentStore content.Store Applier diff.Applier Differ diff.Comparer }
Source Files ¶
annotations.go attestations.go export.go opts.go patch.go writer.go
Directories ¶
Path | Synopsis |
---|---|
exporter/containerimage/exptypes | |
exporter/containerimage/image |
- Version
- v0.20.1
- Published
- Mar 5, 2025
- Platform
- js/wasm
- Imports
- 62 packages
- Last checked
- 1 minute ago –
Tools for package owners.