Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task failed to start when deploying on Arm64 machine (M1 Mac) #43

Open
hojongs opened this issue Feb 9, 2022 · 0 comments
Open

Task failed to start when deploying on Arm64 machine (M1 Mac) #43

hojongs opened this issue Feb 9, 2022 · 0 comments

Comments

@hojongs
Copy link

hojongs commented Feb 9, 2022

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 just exit 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

-        image: isDockerInstalled()
-          ? ecs.ContainerImage.fromAsset(
-              path.resolve(__dirname, '../../minecraft-ecsfargate-watchdog/')
-            )
-          : ecs.ContainerImage.fromRegistry(
-              'doctorray/minecraft-ecsfargate-watchdog'
-            ),
+        image: ecs.ContainerImage.fromRegistry(
+              'doctorray/minecraft-ecsfargate-watchdog'
+            ),

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant