- Newest
- Most votes
- Most comments
So...after banging my head against the wall, it turns out that I had to change one line: From
FROM nginx:alpine
to
FROM --platform=linux/amd64 nginx:latest
Probably because I'm using a mac for my coding. There was a comment from someone on reddit saying they had an issue with their M1 mac, but I thought that since I'm using an M3 mac, it wouldn't affect me...
Anyway if anyone from AWS reads this, please put an official note somewhere in your documentation, thank you.
Hello.
Is this what you're trying to do to deploy a Node.js application?
In that case, why not try using CMD in your Dockerfile to start the application as shown below?
https://docs.aws.amazon.com/apprunner/latest/dg/service-source-code-nodejs.html
CMD ["node", "app.js"]
Hi,
When you say It works fine when tested locally., is it already within a container or as a plain application on your desktop ?
If it's out of a container, I'd suggest that you get it first to run locally on a container (with your local registry) before pushing to ECR: that will make it easier to debug. Then, you'll be sure to have a working image when you switch to ECR and AWS.
Best.
Didier
It's working as a container. It is a working image. I have also deleted it off my system, docker pulled it and ran it again with docker run. In fact, it is a public repo: public.ecr.aws/b6r5q5g0/sample-angular:latest and I think anyone should be able to pull it I think. It throws the error on app runners however
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 5 months ago
It's an nginx application. The dockerfile I posted is a multistage build: it uses node to build the angular app and moves the file to nginx when creating the container.