MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / getImagePlatforms

Method getImagePlatforms

daemon/src/service/docker_service.ts:189–197  ·  view source on GitHub ↗

* Get supported platforms for a Docker image * Attempts to fetch manifest from registry to get platform information * @param imageName Image name in format "image:tag" or "registry/image:tag" * @returns Array of supported platform strings (e.g., ["linux/amd64", "linux/arm64"])

(imageName: string)

Source from the content-addressed store, hash-verified

187 * @returns Array of supported platform strings (e.g., ["linux/amd64", "linux/arm64"])
188 */
189 async getImagePlatforms(imageName: string): Promise<string[]> {
190 try {
191 // try to get manifest from registry using Docker Registry HTTP API V2
192 return await this.getImagePlatformsFromRegistry(imageName);
193 } catch (error: any) {
194 // if we can't determine platforms, return empty array
195 return [];
196 }
197 }
198
199 /**
200 * Fetch image platforms from Docker registry using HTTP API V2

Callers 1

Calls 1

Tested by

no test coverage detected