Documentation ¶
Index ¶
- Constants
- func BuildImageFromLayer(ctx context.Context, baseImage v1.Image, layer v1.Layer, ...) (oci.SignedImage, error)
- func BuildImageTarballFromLayer(ctx context.Context, imageRef string, layer v1.Layer, outputTarGZ string, ...) error
- func BuildIndex(outfile string, idx oci.SignedImageIndex, tags []string) (name.Digest, error)
- func GenerateDockerIndex(ctx context.Context, ic types.ImageConfiguration, ...) (name.Digest, oci.SignedImageIndex, error)
- func GenerateIndex(ctx context.Context, ic types.ImageConfiguration, ...) (name.Digest, oci.SignedImageIndex, error)
- func LoadImage(ctx context.Context, image oci.SignedImage, tags []string) (name.Reference, error)
- func LoadIndex(ctx context.Context, idx oci.SignedImageIndex, tags []string) (name.Reference, error)
- func PostAttachSBOM(ctx context.Context, si oci.SignedEntity, sboms []types.SBOM, ...) (oci.SignedEntity, error)
- func PostAttachSBOMsFromIndex(ctx context.Context, idx oci.SignedImageIndex, sboms []types.SBOM, ...) error
- func PublishImagesFromIndex(ctx context.Context, idx oci.SignedImageIndex, repo name.Repository, ...) ([]name.Digest, error)
- func PublishIndex(ctx context.Context, idx oci.SignedImageIndex, tags []string, ...) (name.Digest, error)
Constants ¶
const ( LocalDomain = "apko.local" LocalRepo = "cache" )
Variables ¶
This section is empty.
Functions ¶
func BuildImageFromLayer ¶ added in v0.7.0
func BuildImageFromLayer(ctx context.Context, baseImage v1.Image, layer v1.Layer, ic types.ImageConfiguration, created time.Time, arch types.Architecture) (oci.SignedImage, error)
func BuildIndex ¶ added in v0.7.0
BuildIndex builds a self-contained tar.gz file containing the index and its individual images for all architectures. Returns the digest and the path to the combined tar.gz.
func GenerateDockerIndex ¶ added in v0.9.0
func GenerateDockerIndex(ctx context.Context, ic types.ImageConfiguration, imgs map[types.Architecture]oci.SignedImage) (name.Digest, oci.SignedImageIndex, error)
GenerateDockerIndex generates a docker multi-arch manifest from the given imgs. The index type will be "application/vnd.docker.distribution.manifest.list.v2+json". The index is stored in memory.
func GenerateIndex ¶ added in v0.9.0
func GenerateIndex(ctx context.Context, ic types.ImageConfiguration, imgs map[types.Architecture]oci.SignedImage) (name.Digest, oci.SignedImageIndex, error)
GenerateIndex generates an OCI image index from the given imgs. The index type will be "application/vnd.oci.image.index.v1+json". The index is stored in memory.
func LoadIndex ¶ added in v0.10.0
func LoadIndex(ctx context.Context, idx oci.SignedImageIndex, tags []string) (name.Reference, error)
If attempting to save locally, pick the native architecture and use that cached image for local tags Ported from https://github.com/ko-build/ko/blob/main/pkg/publish/daemon.go#L92-L168
func PostAttachSBOM ¶ added in v0.5.0
func PostAttachSBOM(ctx context.Context, si oci.SignedEntity, sboms []types.SBOM, platform *v1.Platform, tags []string, remoteOpts ...remote.Option) (oci.SignedEntity, error)
PostAttachSBOM attaches the sboms to a single already published image
func PostAttachSBOMsFromIndex ¶ added in v0.9.0
func PostAttachSBOMsFromIndex(ctx context.Context, idx oci.SignedImageIndex, sboms []types.SBOM, tags []string, remoteOpts ...remote.Option) error
PostAttachSBOMsFromIndex attaches SBOMs to an already published index and all of the referenced images
func PublishImagesFromIndex ¶ added in v0.9.0
func PublishImagesFromIndex(ctx context.Context, idx oci.SignedImageIndex, repo name.Repository, remoteOpts ...remote.Option) ([]name.Digest, error)
PublishImagesFromIndex publishes all images from an index to a remote registry. The only difference between this and PublishIndex is that PublishIndex pushes out all blobs and referenced manifests from within the index. This adds pushing the referenced SignedImage artifacts along with appropriate tags.
func PublishIndex ¶ added in v0.2.0
func PublishIndex(ctx context.Context, idx oci.SignedImageIndex, tags []string, remoteOpts ...remote.Option) (name.Digest, error)
PublishIndex given an oci.SignedImageIndex, publish it to a registry. `local` causes it to publish to the local docker daemon instead of the registry. Note that docker, when provided with a multi-architecture index, will load just the image inside for the provided platform, defaulting to the one on which the docker daemon is running. PublishIndex will determine that platform and use it to publish the updated index.
Types ¶
This section is empty.