Ops, Deploy

A build on a diet

Rewrote the ignore rules so every deploy ships only what the image needs.

  1. 01

    Symptom

    Deploys to staging and production were slow, and the build machine kept running out of disk.

  2. 02

    Root cause

    The ignore rules missed local data, media and dependency folders, so every build sent about 54GB to Docker.

  3. 03

    Fix

    Audited what the image actually needs and rewrote the ignore rules to send only that.

  4. 04

    Impact

    Build context down from ~54GB to ~5GB, with faster deploys.

Steps

  1. measure the context size before touching anything
  2. list the largest folders sent to the daemon
  3. allow only what the image needs
  4. re-measure on staging, then production

Stack

Docker, CI/CD, Linux