Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Pratyay360/podman-ts/llms.txt

Use this file to discover all available pages before exploring further.

ManifestsManager provides access to OCI manifest lists (also called image indexes), which bundle multiple platform-specific images under a single tag. You can create a multi-platform manifest, add images to it, push it to a registry, and remove individual platform entries by digest — all without leaving TypeScript. Access the manager via client.manifests on any PodmanClient instance.

ManifestsManager methods

create

create(name: string, images: Array<Image | string>, all?: boolean): Promise<Manifest>
Create a new manifest list and return a Manifest instance. At least one image reference must be provided; passing an empty array throws a TypeError.
name
string
required
Name for the manifest list (e.g. "registry.example.com/myapp:latest").
images
Array<Image | string>
required
One or more image references to seed the manifest. Each entry may be an Image instance or a plain string reference.
all
boolean
When true, include all images from a multi-arch source rather than only the current platform’s image.

get

get(key: string): Promise<Manifest>
Fetch an existing manifest list by name or ID. Throws NotFound if no manifest with that name exists.

exists

exists(key: string): Promise<boolean>
Return true if a manifest list with the given name exists, false otherwise. Does not throw.

removeManifest

removeManifest(name: string | Manifest): Promise<Record<string, unknown>>
Delete a manifest list. Accepts either a name string or an existing Manifest instance. Returns a summary object with an ExitCode property reflecting the HTTP status.

list

list() always throws Error: Podman service does not support listing manifests. The Podman libpod API does not expose a list endpoint for manifest lists. Use get() to fetch a specific manifest by name.

Manifest instance methods

A Manifest object is returned by create() and get(). It exposes the following methods:

add

add(images: Array<Image | string>, options?: {
  all?: boolean;
  annotation?: Record<string, string>;
  arch?: string;
  features?: string[];
  os?: string;
  osVersion?: string;
  variant?: string;
}): Promise<void>
Add one or more images to the manifest list. After a successful add, the instance’s attrs are refreshed automatically via reload().
images
Array<Image | string>
required
Image references to add. Each may be an Image instance or a plain string tag.
options.all
boolean
Include all platform variants when the source is itself a manifest list.
options.annotation
Record<string, string>
Annotations to attach to each added image entry.
options.arch
string
Override the architecture field (e.g. "amd64", "arm64").
options.os
string
Override the OS field (e.g. "linux", "windows").
options.osVersion
string
Override the OS version field.
options.variant
string
Override the variant field (e.g. "v8" for arm64 variants).
options.features
string[]
List of CPU features to record in the manifest entry.

push

push(destination: string, options?: {
  all?: boolean;
  authConfig?: Record<string, string>;
}): Promise<void>
Push the manifest list to a registry destination.
destination
string
required
Registry reference to push to (e.g. "registry.example.com/myapp:latest").
options.all
boolean
Push all referenced images alongside the manifest list.
options.authConfig
Record<string, string>
Registry credentials forwarded in the X-Registry-Auth header. Typical keys: username, password, serveraddress.

remove

remove(digest: string): Promise<void>
Remove a single platform entry from the manifest list by its digest. The digest may be in the form "sha256:<hex>" or include an image reference prefix with @ — the method normalises both. After removal, attrs are refreshed automatically.

reload

reload(): Promise<void>
Refresh this instance’s attrs from the Podman API. Called automatically after add() and remove().

Manifest instance properties

PropertyTypeDescription
namestringManifest list name.
idstring | undefinedDigest of the first platform entry (hex portion only), or name if no entries exist.
mediaTypestring | undefinedOCI media type of the manifest.
versionnumber | undefinedSchema version from the manifest JSON.

Code examples

Create a manifest list

import { PodmanClient } from "@pratyay360/podman-ts";

const client = new PodmanClient();

const manifest = await client.manifests.create(
  "registry.example.com/myapp:latest",
  ["docker.io/library/alpine:latest"],
);

console.log("Created manifest:", manifest.name);
console.log("Media type:", manifest.mediaType);

Add an image to an existing manifest

const manifest = await client.manifests.get("registry.example.com/myapp:latest");

await manifest.add(["docker.io/myorg/myapp:arm64"], {
  arch: "arm64",
  os: "linux",
  variant: "v8",
});

console.log("Image added to manifest.");
Pass all: true when adding a manifest list reference (not a single image) to pull in every platform it contains.

Push a manifest list to a registry

await manifest.push("registry.example.com/myapp:latest", {
  all: true,
  authConfig: {
    username: "myuser",
    password: "mypassword",
    serveraddress: "registry.example.com",
  },
});

console.log("Manifest pushed successfully.");

Remove a platform entry by digest

const manifest = await client.manifests.get("registry.example.com/myapp:latest");

// The digest can be the full "sha256:<hex>" form or an image@digest reference.
await manifest.remove("sha256:abc123def456");

console.log("Platform entry removed.");

Check existence and delete a manifest

const exists = await client.manifests.exists("registry.example.com/myapp:latest");

if (exists) {
  const result = await client.manifests.removeManifest("registry.example.com/myapp:latest");
  console.log("Deleted, exit code:", result.ExitCode);
}

Build docs developers (and LLMs) love