Search documentation
karat

+

K

ReferenceApollo Product SpecificationProducts and PackagingContainer Images

Container Image Specification

This document outlines how to specify container images in the Apollo Product Release Manifest.

Publishing Images

Container images that form a Product Release can be published under any name that matches the OCI image specification. A fully qualified image name must conform to the OCI image name specification. See the Kubernetes and OCI documentation for reference. Image names must have the following format:

Copied!
1 {registry}/{repository}/{imageName}:{version}

Where:

  • {registry}: The full URL where the artifact exists.
  • {repository} (Optional): Repository where the artifact exists within the overall registry.
  • {imageName}: Name of the image.
  • {version}: The digest or tag that indicates which version of the image to pull.

Example of valid image names:

  • docker.io/bitnami/wordpress:5.9.2-debian-10-r9
  • docker.io/bitnami/wordpress:5.9.2-debian-10-r9@sha256:1234
  • bitnami/wordpress:5.9.2-debian-10-r9
  • docker.io/library/nginx:stable-perl

Example of invalid image names:

  • bitnami/wordpress
  • bitnami/wordpress@sha256:1234

Specifying container images in the manifest extension

All container images that a Product Release uses, must be declared via the artifacts manifest extension. This extension is a list of fully qualified image locators and can be used by all Apollo Product Spec product types.

Example Usage

Copied!
1 2 3 4 extensions: artifacts: - type: oci uri: docker.io/bitnami/wordpress:5.9.2-debian-10-r9

Each listed artifact must provide the following fields:

  • type: the artifact's type. The only currently supported value is oci, used for artifacts that comply with the Open Container Initiative image specification.
  • uri: a fully qualified locator for the artifact.

Best practice: Base image reuse

Images should be as lean as reasonably possible. Image bloat is a concern both for storing images and running containers; to prevent image bloat, reuse base images and do not add unnecessary layers to your image. An example of a lightweight base image in use by many products is Alpine.