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:
I already try these methods(doesn't work):
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.
AWS ECS exec /usr/local/bin/docker-entrypoint.sh: exec format error