Set explicit arm64 platform on Docker image build (#30)
fromAsset() builds for the host architecture by default. On x86_64 GitHub Actions runners, this produces an x86 image even with QEMU installed — the Fargate ARM64 task then fails with exec format error.
This commit is contained in:
parent
94a837c08c
commit
50da33712b
1 changed files with 2 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { Construct } from 'constructs';
|
||||
import * as ecs from 'aws-cdk-lib/aws-ecs';
|
||||
import * as ecr_assets from 'aws-cdk-lib/aws-ecr-assets';
|
||||
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
||||
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
|
||||
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
||||
|
|
@ -37,6 +38,7 @@ export class SocketModeConstruct extends Construct {
|
|||
taskDef.addContainer('socket-mode', {
|
||||
image: ecs.ContainerImage.fromAsset(
|
||||
path.join(__dirname, '../../services/socket-mode'),
|
||||
{ platform: ecr_assets.Platform.LINUX_ARM64 },
|
||||
),
|
||||
environment: {
|
||||
APP_TOKEN_SECRET_ARN: appTokenSecret.secretArn,
|
||||
|
|
|
|||
Reference in a new issue