nemo_gym.tasks.harbor.registry
nemo_gym.tasks.harbor.registry
Read an image’s configuration from its OCI registry.
Parses Docker-style references with Docker Hub defaults, selects the platform’s manifest from an index, follows the bearer token challenge, drops authorization across redirects, retries transient failures and returns the configuration keys the records keep, pinned to the digest of the manifest the reference named. Nothing here knows about tasks or Compose. The module keeps the record key list, the platform constants and ImageConfigError, which the rest of the package imports from here.
Module Contents
Classes
Functions
Data
API
Bases: RuntimeError
An image reference could not be resolved to a linux/amd64 configuration.
A parsed image reference: [registry/]repository[:tag][@digest].
The repository a digest pin is written against: as the registry names it, host included off Docker Hub.
Read manifests and configuration blobs over the OCI distribution API with the standard library.
credentials maps a registry host to (username, password) for private repositories;
public ones use the anonymous token the registry hands out.
One GET; connection-level failures (not HTTP errors) are retried with a short backoff.
One compose-images.json entry for reference.
Bases: HTTPRedirectHandler
Follow a registry redirect without carrying the registry’s token to another host.
Registries answer a blob request with a redirect to a storage host (Docker Hub, GHCR and ECR all
do). The OCI distribution spec says a client must not send its Authorization there, and the
default handler forwards every header, so the header is dropped whenever the host changes.
Split an image reference the way Docker does, defaulting to Docker Hub.