Dockerfile layer-caching prompt cuts Rails deploy from 4 minutes to 54s

DanielLockyer · x · 2026-12-02

DanielLockyer shares a one-line prompt: "Review my Dockerfile and optimise it for layer caching. Minimise invalidation so small changes don't force full rebuilds." User ericintheloft tried it on a Rails app deployed with Kamal: image layer shrank from 190MB to 10MB and full deploys dropped from 4 minutes to 54 seconds.

Original post →

More from coding & agent

coding & agent channel →