Coding task · Next.js course · Module 9: Integrations and Advanced Features

Dockerfile for Next.js

Create an optimized Dockerfile for Next.js.

Task

Write a multi-stage Dockerfile for Next.js: install the dependencies and build the app in a stage based on a node image, copy only the build output into the final stage (COPY --from) and start the app with CMD.