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.
ImagesManager provides a high-level interface for working with OCI and Docker container images. It is accessible via client.images on any PodmanClient instance and covers the full image lifecycle including pulling from registries, building from a Dockerfile context, pushing, tagging, and removal.
ImagesManager methods
list
Filter by image reference. Internally mapped to the
reference filter parameter.Include intermediate build layers.
Additional key/value filters (e.g.
{ dangling: "true" }).get
Image instance. Throws ImageNotFound if the image does not exist.
pull
Image instance.
Tag to pull (e.g.
"latest"). When set, the full reference becomes repository:tag.Pull all tags for the repository.
Suppress progress output.
Verify TLS certificates for the registry. Set to
false for insecure registries.push
Specific tag to push.
Verify TLS certificates for the destination registry.
build
Bun.spawn(["tar", ...]) and POSTed to /build.
build() uses Bun.spawn to create the tar archive. This method requires the Bun runtime and will not work under Node.js.{ image, logs } where image is the resulting Image instance and logs is the raw build output split by line.
See BuildOptions below for the full list of parameters.
search
Maximum number of results to return.
Search filters (e.g.
{ "is-official": "true" }).Verify TLS for registry connections.
Include available tags in results.
exists
true if an image with the given name or ID is present locally, false otherwise.
remove
ImageNotFound if the image does not exist.
Force removal even if the image is in use by a container.
prune
Remove all unused images, not just dangling ones.
Prune filters (e.g.
{ until: "24h" }).Image instance methods
AnImage object is returned by get(), pull(), and build(), and each element of list().
| Method | Signature | Description |
|---|---|---|
history | (): Promise<Record<string, unknown>[]> | Return the layer history of the image. |
tag | (repository: string, tag?: string): Promise<boolean> | Add a tag to the image. |
remove | (options?: { force?: boolean }): Promise<Record<string, unknown>[]> | Remove the image. |
reload | (): Promise<void> | Refresh image.attrs from the API (equivalent to re-inspecting). |
image.id, image.tags (filtered RepoTags), image.labels.
There is no standalone
inspect() method on an Image instance. Use client.images.get(name) for fresh inspect data, or call image.reload() to update the instance’s cached attributes in place.BuildOptions
Full reference for options accepted byclient.images.build():
Absolute path to the build context directory. The entire directory is packaged as a tar and sent to the daemon.
Dockerfile/Containerfile name relative to
path.Name and optionally a tag for the resulting image (e.g.
"myapp:v1").Build-time variables passed as
--build-arg (e.g. { VERSION: "1.2.3" }).Target build stage in a multi-stage Dockerfile.
Disable the layer cache.
Always attempt to pull a newer version of base images.
Remove intermediate containers after a successful build.
Always remove intermediate containers, even on failure.
Suppress build output.
Target platform (e.g.
"linux/arm64").Network mode for the build container (e.g.
"host", "none").Squash all layers into a single layer.
Images to use as cache sources.
Additional host-to-IP mappings for the build container.
Labels applied to the resulting image.
Secret IDs to expose during the build.
Size of
/dev/shm in bytes.Cache intermediate layers.
Pass
HTTP_PROXY/HTTPS_PROXY environment variables to the build.Add the built image to the named manifest list.
Resource limits for the build container.