Skip to content
v2.273.0

Platform Class ​

platform supported by docker.

Example ​

ts
import { DockerImageAsset, Platform } from 'aws-cdk-lib/aws-ecr-assets';

const asset = new DockerImageAsset(this, 'MyBuildImage', {
  directory: path.join(__dirname, 'my-image'),
  platform: Platform.LINUX_ARM64,
})

Properties ​

LINUX_AMD64Platformlinux_amd64PlatformLINUX_AMD64PlatformLINUX_AMD64PlatformLINUX_AMD64Platformrequiredstatic#
Build for linux/amd64.
LINUX_ARM64Platformlinux_arm64PlatformLINUX_ARM64PlatformLINUX_ARM64PlatformLINUX_ARM64Platformrequiredstatic#
Build for linux/arm64.
platformstringplatformstrplatformStringPlatformstringPlatform*stringrequired#
The platform to use for docker build.

Methods ​

custom(platform: string): Platform // chainable@staticmethod def custom(platform: str) -> Platformpublic static Platform custom(String platform)public static Platform Custom(string platform)func Custom(Platform *string) Platformstatic#
Used to specify a custom platform Use this if the platform name is not yet supported by the CDK.
1 parameter

Parameters

  • platformplatformplatformplatformPlatform — The platform to use for docker build.