FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Docker done better
How-ToWeb Development

Docker done better

via Dev.to WebdevManas Mishra1mo ago

Chapter 1: What I did I have been building my own project for 3-4 weeks now, and I just realized something after I launched my website. The tech stack is built on Next.js, Node.js, Strapi, OpenAI, MongoDB, etc., and I am using Docker to containerize it. Initially, I didn't pay much attention as I wanted to launch it ASAP, but now, when I am focusing on the storage consumption of the Docker images, then its off the charts. My Next.JS Docker image is of size 3.01 GB Yes, it's hilarious. Because I am doing it the wrong way. The real culprit (it's me, I guess ): My initial Dockerfile of Next.js looks like this # Use official Node image FROM node:22 # Create app directory WORKDIR /app # Copy package files first COPY package*.json ./ # Install dependencies RUN npm install # Copy the rest of the project COPY . . # Build the Next.js app RUN npm run build # Expose port EXPOSE 3000 # Start the app CMD ["npm", "start"] You can clearly see the issue here: The default node:22 image is Debian-based

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
21 views

Related Articles

The Boring Skills That Make Developers Unstoppable in 2026
How-To

The Boring Skills That Make Developers Unstoppable in 2026

Medium Programming • 12h ago

I Installed This VS Code Extension… and My Code Got Instantly Better
How-To

I Installed This VS Code Extension… and My Code Got Instantly Better

Medium Programming • 13h ago

The Age of Personalized Software
How-To

The Age of Personalized Software

Medium Programming • 15h ago

Automating Checkout Add-On Recommendations in WordPress for WooCommerce
How-To

Automating Checkout Add-On Recommendations in WordPress for WooCommerce

Dev.to • 15h ago

How-To

Start Here: Learning to develop your own way with SCSIC

Medium Programming • 19h ago

Discover More Articles