---
title: "Discussion on \"How We Slashed Our Next.js Docker Image Size by 35% (And Cut Build Time in Half)\" | Hashnode"
description: "Discussion on \"How We Slashed Our Next.js Docker Image Size by 35% (And Cut Build Time in Half)\". Cut our Next.js Docker image from 3.4GB to 2.2GB and reduced build time by 50%. Learn the exact Alpine Linux and npm optimization tricks we used."
url: "https://hashnode.com/posts/how-we-slashed-our-nextjs-docker-image-size-by-35-and-cut-build-time-in-half/698dd5c497287065803a1dd9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How We Slashed Our Next.js Docker Image Size by 35% (And Cut Build Time in Half)](https://devops-ashok.hashnode.dev/how-we-slashed-our-nextjs-docker-image-size-by-35-and-cut-build-time-in-half?utm_source=hashnode&utm_medium=feed)

Cut our Next.js Docker image from 3.4GB to 2.2GB and reduced build time by 50%. Learn the exact Alpine Linux and npm optimization tricks we used.

Feb 12 · 5 min read · devops-ashok.hashnode.dev  
Read the article

-   [#devops](https://hashnode.com/tag/devops)
-   [#docker](https://hashnode.com/tag/docker)
-   [#deployment](https://hashnode.com/tag/deployment)
-   [#gcp](https://hashnode.com/tag/gcp)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#networking](https://hashnode.com/tag/networking)
-   [#optimization](https://hashnode.com/tag/optimization)

## Written by

[Ashok kumar](https://hashnode.com/@ashok01)

@ashok01 · India

  
[View profile](https://hashnode.com/@ashok01)

Developer

software dev who actually enjoys debugging (weird, i know) i spend most of my time fixing broken code , Building new things and honestly? i love it. there's something about hunting down bugs that just hits different. when i'm not staring at terminal logs, i'm either at the gym or checking out new places. currently exploring different areas in tech and building stuff in public because why not share the messy journey. india 🇮🇳

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
