---
title: "Comment by Abhinav Sharma on \"Production Next.js Dockerfile: Multi-Stage, Standalone and Non-Root\" | Hashnode"
description: "The standalone tracing is the detail people miss: only the files the server actually imports make it into the runtime stage, which is where most of the size dro"
url: "https://hashnode.com/posts/nextjs-dockerfile/6adf7d1d26319dd161d10aa0/comment/6adf82a197e881f41f9fa012"
---

[Discussion](https://hashnode.com/posts/nextjs-dockerfile/6adf7d1d26319dd161d10aa0)

Comment [Production Next.js Dockerfile: Multi-Stage, Standalone and Non-Root](https://hashnode.com/posts/nextjs-dockerfile/6adf7d1d26319dd161d10aa0)

[Abhinav Sharma](https://hashnode.com/@abhinavs1920)

[Oct 26](https://hashnode.com/posts/nextjs-dockerfile/6adf7d1d26319dd161d10aa0/comment/6adf82a197e881f41f9fa012)

The standalone tracing is the detail people miss: only the files the server actually imports make it into the runtime stage, which is where most of the size drop comes from. The non-root step pairs well with it and is an easy one to skip.

[Waseem Anjum](https://hashnode.com/@fabwaseem)

[Oct 26](https://hashnode.com/posts/nextjs-dockerfile/6adf7d1d26319dd161d10aa0/comment/6adf82a197e881f41f9fa012#reply-6adfa5e8ba2907af020b0d97)

Exactly. In my test the app files inside the standalone runner came to 59 MB, so most of the 287 MB is the Node base image itself. And non-root is only a couple of lines once the node user owns .next, so there's little reason to skip it.
