Ops, Deploy
A build on a diet
Rewrote the ignore rules so every deploy ships only what the image needs.
- 01
Symptom
Deploys to staging and production were slow, and the build machine kept running out of disk.
- 02
Root cause
The ignore rules missed local data, media and dependency folders, so every build sent about 54GB to Docker.
- 03
Fix
Audited what the image actually needs and rewrote the ignore rules to send only that.
- 04
Impact
Build context down from ~54GB to ~5GB, with faster deploys.
Steps
- measure the context size before touching anything
- list the largest folders sent to the daemon
- allow only what the image needs
- re-measure on staging, then production
Stack
Docker, CI/CD, Linux
A thousand welcomes