Push items: containers¶
- class pushsource.ContainerImagePushItem[source]¶
A
PushItem
representing a container image.This item represents any kind of image which can be pulled from a container image registry (i.e. an object identified by a
NAME[:TAG|@DIGEST]
string).In the case of a multi-arch image, one ContainerImagePushItem represents an image for a single architecture only.
Attributes:
build()
[inherited]build_info()
[inherited]dest()
[inherited]md5sum()
[inherited]name()
[inherited]origin()
[inherited]sha256sum()
[inherited]signing_key()
[inherited]src()
[inherited]state()
[inherited]
- dest_signing_key¶
Desired signing key for this container image.
Typically a 16-character identifier for a signing key, such as
"199e2f91fd431d51"
, though the format is not enforced by this library.A non-empty value for this attribute should be interpreted as a request to use the specified key to generate signatures for this image’s manifest(s). See container-signature docs for information on signatures.
- Type:
- labels¶
Labels of this image, if known.
This field is not guaranteed to include all labels associated with the image.
- arch¶
Architecture of this image, if known.
This field uses the conventional architecture strings used throughout the container ecosystem, such as
"amd64"
.- Type:
- pull_info¶
Metadata for pulling this image from a registry.
- Type:
- class pushsource.SourceContainerImagePushItem[source]¶
A
PushItem
representing a source container image.Source container images are a special type of image which are not runnable but instead contain the packaged source code of a related binary image.
See this article for more information on source container images.
Attributes:
arch()
[inherited]build()
[inherited]build_info()
[inherited]dest()
[inherited]dest_signing_key()
[inherited]labels()
[inherited]md5sum()
[inherited]name()
[inherited]origin()
[inherited]product_name()
[inherited]pull_info()
[inherited]sha256sum()
[inherited]signing_key()
[inherited]source_tags()
[inherited]src()
[inherited]state()
[inherited]
- class pushsource.ContainerImagePullInfo[source]¶
Information needed to access a container image from a registry.
Attributes:
- tag_specs¶
Pull specs to access this image by tag.
This may include specs which refer to a manifest list referencing this image, and also specs which refer directly to the image manifest for this image.
This field always contains at least one pull spec. If you don’t care which tag you use, it’s reasonable to use
item.pull_info.tag_specs[0]
.Note that, as all tags are mutable, it’s possible for this information to be outdated. It is recommended to pull by digest or at least cross-reference with digests.
- Type:
- digest_specs¶
Pull specs to access this image by manifest digest.
This may include specs which refer to a manifest list referencing this image, and also specs which refer directly to the image manifest for this image.
These specs are always ordered from most to least preferred manifest type, which means:
manifest list if available, else:
schema2 image manifest if available, else:
schema1 image manifest
- Type:
- media_types¶
All media types for which a manifest is reachable in
digest_specs()
.For information on these types see the image manifest spec.
- Type:
List[str]
- digest_spec_for_type(media_type)[source]¶
Get the digest spec for a specific media type, if available.
- Parameters:
media_type (str) – a MIME type string identifying a type of image manifest or manifest list, e.g. “application/vnd.docker.distribution.manifest.v2+json”
- Returns:
ContainerImageDigestPullSpec
if a digest of the requested type is available
None
if a digest of the requested type is not available
- class pushsource.ContainerImagePullSpec[source]¶
A container image pull spec in parsed form.
Pull spec refers to a
"NAME[:TAG|@DIGEST]"
string used to pull a container image. This class provides a pull spec both in raw string form and parsed into various components, along with information on the available media type.Attributes:
- registry¶
Registry component of pull spec.
Example: in
"registry.access.redhat.com/ubi8/ubi-minimal:latest"
, the registry is"registry.access.redhat.com"
.- Type:
- class pushsource.ContainerImageDigestPullSpec[source]¶
A container image pull spec using a manifest digest.
Attributes:
registry()
[inherited]repository()
[inherited]
- digest¶
Digest component of pull spec.
Example: in
"registry.access.redhat.com/ubi8/ubi-minimal@sha256:0ccb9988abbc72d383258d58a7f519a10b637d472f28fbca6eb5fab79ba82a6b"
, the digest is"sha256:0ccb9988abbc72d383258d58a7f519a10b637d472f28fbca6eb5fab79ba82a6b"
.- Type:
- media_type¶
Media type of the manifest obtained by this pull spec, if known.
Generally, the media type is known for all digest pull specs obtained via koji. It can be checked to determine whether a pull spec refers to a manifest list or an image manifest.
Example:
"application/vnd.docker.distribution.manifest.v2+json"
- Type:
- class pushsource.ContainerImageTagPullSpec[source]¶
A container image pull spec using a tag.
Attributes:
registry()
[inherited]repository()
[inherited]
- tag¶
Tag component of pull spec.
Example: in
"registry.access.redhat.com/ubi8/ubi-minimal:latest"
, the tag is"latest"
.- Type:
- class pushsource.OperatorManifestPushItem[source]¶
A
PushItem
representing an operator manifests archive (typically namedoperator_manifests.zip
).Attributes:
build()
[inherited]build_info()
[inherited]dest()
[inherited]md5sum()
[inherited]name()
[inherited]origin()
[inherited]sha256sum()
[inherited]signing_key()
[inherited]src()
[inherited]state()
[inherited]
Operator related images obtained from a koji build.
- Type:
List[str]
- container_image_items¶
List of related container image push items.
- Type:
List[ContainerImagePushItem]