aws-cdk-lib.aws_ecr_assets.Platform

class Platform

LanguageType name
.NETAmazon.CDK.AWS.Ecr.Assets.Platform
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecrassets#Platform
Javasoftware.amazon.awscdk.services.ecr.assets.Platform
Pythonaws_cdk.aws_ecr_assets.Platform
TypeScript (source)aws-cdk-lib » aws_ecr_assets » Platform

platform supported by docker.

Example

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

NameTypeDescription
platformstringThe platform to use for docker build.
static LINUX_AMD64PlatformBuild for linux/amd64.
static LINUX_ARM64PlatformBuild for linux/arm64.

platform

Type: string

The platform to use for docker build.


static LINUX_AMD64

Type: Platform

Build for linux/amd64.


static LINUX_ARM64

Type: Platform

Build for linux/arm64.

Methods

NameDescription
static custom(platform)Used to specify a custom platform Use this if the platform name is not yet supported by the CDK.

static custom(platform)

public static custom(platform: string): Platform

Parameters

  • platform string — The platform to use for docker build.

Returns

  • Platform

Used to specify a custom platform Use this if the platform name is not yet supported by the CDK.