Expand description
APIs for storing (layered) container images as OSTree commits
Β§Extension of encapsulation support
This code supports ingesting arbitrary layered container images from an ostree-exported
base. See encapsulate for more information on encapsulation of images.
StructsΒ§
- Cached
Image Update - Locally cached metadata for an update to an existing image.
- Compare
State π - Export
ToOCI Opts - Options controlling commit export into OCI
- Image
Importer - Context for importing a container image.
- Image
Proxy Config - Configuration for the proxy.
- Layer
Progress - Sent across a channel to track the byte-level progress of a layer fetch.
- Layered
Image State - State of an already pulled layered image.
- Manifest
Layer State - A container image layer with associated downloaded-or-not state.
- Prepared
Import - Information about which layers need to be downloaded.
EnumsΒ§
- Import
Progress - Sent across a channel to track start and end of a container fetch.
- Prepare
Result - Result of invoking
ImageImporter::prepare.
ConstantsΒ§
- BASE_
IMAGE_ PREFIX - The ostree ref prefix for βbaseβ image references that are used by derived images.
If you maintain tooling which is locally building derived commits, write a ref
with this prefix that is owned by your code. Itβs a best practice to prefix the
ref with the project name, so the final ref may be of the form e.g.
ostree/container/baseimage/bootc/foo. - IMAGE_
PREFIX π - The ostree ref prefix for image references.
- LAYER_
PREFIX π - The ostree ref prefix for blobs.
- META_
CONFIG π - The key injected into the merge commit with the image configuration serialized as JSON.
- META_
MANIFEST π - The key injected into the merge commit with the manifest serialized as JSON.
- META_
MANIFEST_ πDIGEST - The key injected into the merge commit for the manifest digest.
- OSTREE_
BASE_ πDEPLOYMENT_ REFS - The ref prefixes which point to ostree deployments. (TODO: Add an official API for this)
- RPMOSTREE_
BASE_ πREFS - A layering violation weβll carry for a bit to band-aid over https://github.com/coreos/rpm-ostree/issues/4185
FunctionsΒ§
- chunking_
from_ πlayer_ committed - The way we store βchunkβ layers in ostree is by writing a commit
whose filenames are their own object identifier. This function parses
what is written by the
ImporterMode::ObjectSetlogic, turning it back into a βchunkedβ structure that is used by the export code. - cleanup_
root π - Automatically clean up files that may have been injected by container builds. xref https://github.com/containers/buildah/issues/4242
- clear_
cached_ update - Remove any cached
- compare_
commit_ πtrees - compare_
file_ πinfo - copy
- Copy a downloaded image from one repository to another, while also optionally changing the image reference type.
- export
- Given a container image reference which is stored in
repo, export it to the target image location. - export_
to_ πoci - Export an imported container image to a target OCI directory.
- gc_
image_ layers - Garbage collect unused image layer references.
- gc_
image_ πlayers_ impl - image_
config_ πfrom_ commitmeta - image_
filtered_ content_ warning - Generate a suitable warning message from given list of filtered files, if any.
- inode_
of_ πobject - layer_
from_ πdiffid - Given a target diffid, return its corresponding layer. In our current model, we require a 1-to-1 mapping between the two up until the ostree level. For a bit more information on this, see https://github.com/opencontainers/image-spec/blob/main/config.md
- list_
container_ πdeployment_ manifests - Iterate over deployment commits, returning the manifests from commits which point to a container image.
- list_
images - List all images stored
- manifest_
data_ πfrom_ commitmeta - manifest_
digest_ from_ commit - Return the original digest of the manifest stored in the commit metadata.
This will be a string of the form e.g.
sha256:<digest>. - manifest_
for_ πimage - parse_
cached_ πupdate - Given detached commit metadata, parse the data that we serialized for a pending update (if any).
- parse_
manifest_ πlayout - parse_
ostree_ πmanifest_ layout - Like
parse_manifest_layoutbut requires the image has an ostree base. - query_
image - Query metadata for a pulled image.
- query_
image_ commit - Query metadata for a pulled image via an OSTree commit digest. The digest must refer to a pulled container imageβs merge commit.
- query_
layer π - ref_
for_ πblob_ digest - Convert e.g. sha256:12345β¦ into
/ostree/container/blob/sha256_2B12345.... - ref_
for_ πimage - Convert e.g. sha256:12345β¦ into
/ostree/container/blob/sha256_2B12345.... - ref_
for_ πlayer - Convert e.g. sha256:12345β¦ into
/ostree/container/blob/sha256_2B12345.... - remove_
image - Remove the specified image reference. If the image is already not present, this function will successfully perform no operation.
- remove_
images - Remove the specified image references. If an image is not found, further images will be removed, but an error will be returned.
- timestamp_
of_ πmanifest_ or_ config - Find the timestamp of the manifest (or config), ignoring errors.
- try_
query_ πimage - Attempt to query metadata for a pulled image; if it is corrupted, the error is printed to stderr and None is returned.
- verify_
container_ πimage
Type AliasesΒ§
- Meta
Filtered Data - The type used to store content filtering information.