0

I want to deploy my Frontend (node version - 16.13, this is why I choose LINUX X86 environment ) application on AWS ECS. However, the log of codedeploy always show exec /usr/local/bin/docker-entrypoint.sh: exec format error. The phase of codebuild is successful.

**Dockerfile **

FROM node:lts-alpine as build-stage

# FROM --platform=linux/amd64 node:lts-alpine
# Create app directory
WORKDIR /app
# Install app dependencies
COPY package*.json ./
RUN npm ci

# Copy app files
COPY . /app

# Build app
RUN npm run build

EXPOSE 3000

# Serve the app
CMD ["npm", "start"]

This is my environment:

enter image description here

enter image description here

I already try these methods(doesn't work):

  1. https://alex-shim.medium.com/building-a-docker-image-for-aws-x86-64-ec2-instance-with-mac-m1-chip-44a3353516b9

  2. I want to change the environment of AWS ECS(from x86 to ARM). However, there is only LINUX X86 which can support the nodejs 16.

  3. AWS ECS exec /usr/local/bin/docker-entrypoint.sh: exec format error

  • If you are building on AWS CodeBuild, and deploying to AWS ECS, what does having an M1 Mac have to do with anything at all? How is your laptop related to the issue? – Mark B May 24 '23 at 14:12

0 Answers0