I spent a day getting out of memory error building Next app from Dockerfile. It is a small app with a few pages. However, removing Dockerfile and let the app built with Buildpack results in successful deployment
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.