Skip to main content

Function: listImages()

listImages(options?): Promise<ImageInfo[]>

List the container images. Only images from a final layer (no children) are returned.

Parameters

options?

ListImagesOptions

optional options for listing images

Returns

Promise<ImageInfo[]>

A promise resolving to an array of images information. This method returns a subset of the available information for images. To get the complete description of a specific image, you can use the containerEngine.getImageInspect method.

Examples

// Example 1: List all container images when no specific provider is provided.
const images = await listImages();
console.log(images);
// Example 2: List container images for a specific provider.
const provider = provider.getContainerConnections().find(connection => connection.connection.status() === 'started');
const images = await listImages({ provider: provider.connection });
console.log(images);

Defined in

packages/extension-api/src/extension-api.d.ts:3839