I've tried to deploy it on the M1 Mac.
When I deployed it without customization code, I've got tasks failed to start issue on AWS ECS.
The reason was the failure of the watchdog container.
The error message was just exit code 1 on the container in the failed task.
If the script builds a watchdog image from the asset, you get an arm64 build image.
The image doesn't work because the current ECS Task definition use x86 CPU architecture. Otherwise need to config: AWS ECS Doc: Specifying the ARM architecture in your task definition
So, I changed the code to get the image from the registry always.
Related issue: #27
Just share my solution to resolve the same issue of others and to improve the code to support arm64 machine efficiently.
Description
I've tried to deploy it on the M1 Mac. When I deployed it without customization code, I've got
tasks failed to start
issue on AWS ECS. The reason was the failure of the watchdog container. The error message was justexit code 1
on the container in the failed task.How to fix
https://github.com/doctorray117/minecraft-ondemand/blob/main/cdk/lib/minecraft-stack.ts#L226-L232
If the script builds a watchdog image from the asset, you get an arm64 build image. The image doesn't work because the current ECS Task definition use x86 CPU architecture. Otherwise need to config: AWS ECS Doc: Specifying the ARM architecture in your task definition So, I changed the code to get the image from the registry always.
Related issue: #27
Just share my solution to resolve the same issue of others and to improve the code to support arm64 machine efficiently.