YOU can have GOOD Dockerfiles
Not sure about your Dockerfile? Confused? Overwhelmed? Get expert guidance for production-ready containers that are faster, smaller and more secure.
Review Your Dockerfile With UsIvan and Kyle team up to make your Dockerfiles better
Choosing an Optimal Node.js Base Image
Choosing an Optimal Node.js Base Image
Before
FROM node:22 AS build
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
# Poor but common base image choice
FROM node:22 AS runtime
WORKDIR /app
COPY /app/.output .
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "/app/.output"]
After
FROM node:22-slim AS build
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
# A simple change with a huge impact
FROM node:22-slim AS runtime
WORKDIR /app
COPY /app/.output .
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "/app/.output"]
Improvement
A single line change that leads to an immediate removal of 900+ CVEs and a 80% base image size reduction.
Read more about this improvement → Read more about this improvement →The Container Guys

Kyle Quest
linktr.ee/kcqon- Security and Containerization Expert
- Created DockerSlim & Founded Slim.AI
- On a mission to make containers smaller

Ivan Velichko
x.com/iximiuz- Software Engineer and Tech Storyteller
- Creator and author of labs.iximiuz.com
- Here to help you master Linux and Docker
Want Your Dockerfile Improved?
Send us your Dockerfile to analyze it for potential improvements in size, security, and build speed. The most challenging Dockerfiles will get an opportunity to be reviewed live.
How it works
- One-off Dockerfile reviews are provided free of charge (assuming well-detailed submission).
- For engagements larger than one-off reviews, the terms will be discussed via the email.
- If your team needs a workshop on Docker or specifically on building good container images, you can request it in the description field.
Or Learn How to Do It Yourself

How to Build Smaller Container Images: Docker Multi-Stage Builds

A Deeper Look into Node.js Docker Images: Help, My Node Image Has Python!

Building Container Images FROM Scratch: 6 Pitfalls That Are Often Overlooked

What's Inside Distroless Container Images: Taking a Closer Look

Ensure a Graceful Termination for a Containerized Node.js Application

Build a Production-Ready Node.js Container Image: Next.js Application

Build a Production-Ready Go Container Image: A Dynamically Linked Application
