Docker + Azure DevOps: a CI/CD recipe that halves release time
The exact pipeline structure, caching tricks and image layering rules that took our deploys from 18 minutes to under 9.
Slow pipelines kill momentum. Every minute a deploy takes is a minute someone is context-switching out of focus. Here's the pipeline shape I now use as a template.
Multi-stage Dockerfiles
A two-stage Dockerfile with a slim runtime base is non-negotiable. Build dependencies should never ship to production.
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/.next ./.next
CMD ["npm", "start"]Cache like you mean it
Azure DevOps cache tasks on node_modules and the .next/cache directory shaved nearly 7 minutes off cold builds in our case.
Tagged
Keep reading
All posts →Shipping SSR on Next.js: how I cut page loads by 35%
A pragmatic walk-through of the rendering, caching and image strategies behind a real CMS revamp — including the trade-offs nobody talks about.
Design systems with Tailwind: lessons from real-world products
Tokens, primitives, and the discipline it takes to keep a Tailwind codebase from devolving into utility-class soup.
Build log: shipping a real-time video app with WebRTC & Socket.io
What I learned wiring up signaling, ICE servers and connection recovery for MeetSpace — the unsexy parts of real-time.