Dockerize a Next.js App
<p>If you want to deploy your Next.js App on Vercel, you will not need a container in this case. Since Next.js is created and maintained by Vercel, you can do your deployment with ease. However, if you are looking into running your App through AWS, Google Cloud Run or other cloud providers, you will need a container.</p>
<p>Most of the articles I found online explains how to dockerize a Node.js App, but not much focusing on a Next.js App. There are solutions out there, but those solutions gives me some errors that took me hours in figuring out. So I am just going to share the way I did it, the problems I encoutered, and my solutions to those.</p>
<h1>Getting Started!</h1>
<p>Start with any existing Next.Js project you have or simply clone one from one of the examples provided officially by Vercel. Some other solutions I found online suggested that configuring the application to build a standalone application through adding the following lines to <code>next.config.js</code> is a must, but I found everything worked fine without adding it.</p>
<p><a href="https://medium.com/@2018.itsuki/dockerize-a-next-js-app-4b03021e084d"><strong>Learn More</strong></a></p>