Set explicit arm64 platform on Docker image build #30
No reviewers
Labels
No labels
app
bug
ci
compliance
dependencies
docker
docs
documentation
duplicate
enhancement
good first issue
help wanted
infra
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adam/seahaven-slack-bot#30
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/socket-mode-arm64-platform"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix the socket-mode ECS container crash caused by architecture mismatch. CDK's
ContainerImage.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 task definition requires ARM64, so the container fails withexec format error.Adds
platform: ecr_assets.Platform.LINUX_ARM64to thefromAsset()call so Docker builds the image with--platform linux/arm64via QEMU emulation.Validation
exec format errorin CloudWatch logs (container starts and immediately exits with code 255)runtimePlatform.cpuArchitecture: ARM64)tsc --noEmitpasses locallyTests
Deploy will be validated on merge to main — CloudFormation will update the ECS service with the correctly-built arm64 image.
Notes
The CloudFormation stack is currently rolling back. Wait for
UPDATE_ROLLBACK_COMPLETEbefore merging.Looks good. Targeted fix for the architecture mismatch — adding
Platform.LINUX_ARM64tofromAsset()correctly matches the task definition'scpuArchitecture: ARM64and resolves theexec format errorfrom x86 images being run on ARM64 Fargate. No bugs, security, or convention concerns.