Sending build context Docker Origin: Platform & cloud Last updated 12 Oct 2026

Docker build slow: "Sending build context to Docker daemon 2.5GB" / transferring context takes forever

docker build is uploading your whole project folder — node_modules, .git, data files — before building, because there’s no (or a weak) .dockerignore.

Exact message you may see Sending build context to Docker daemontransferring contextbuild context too large
Seen on: Docker

Meaning

Everything in the context is sent to the builder and can invalidate the cache for COPY . . steps. Large contexts make builds slow and images bloated.

Common causes

  • No .dockerignore
  • node_modules, .git, build output or datasets in the folder
  • Build context set to a parent/home directory

⚡ Quick fix

  1. Add a .dockerignore
  2. Build from the project directory, not its parent
  3. Copy only what’s needed (package*.json first, then source)

Detailed fix by platform

Docker

  1. bash
    # .dockerignore
    node_modules
    .git
    dist
    *.log
    .env

How to diagnose

  1. Size — du -sh in the context folder
  2. Ignore — .dockerignore present and correct?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

1200 — Cloudflare Error 1200: Cache connection limit (Cloudflare)1200304 — HTTP 304 Not Modified (HTTP)304504 — HTTP 504 Gateway Timeout (HTTP)504524 — Cloudflare Error 524: A Timeout Occurred (Cloudflare)52457014 — ERROR: canceling statement due to statement timeout (PostgreSQL)57014ANR — ANR: Application Not Responding (Input dispatching timed out) (Android)ANRbind source path does not exist — invalid mount config for type "bind": bind source path does not exist (Docker)bind source path does…cf-cache-status: DYNAMIC — Cloudflare not caching: cf-cache-status DYNAMIC / BYPASS / MISS every time (Cloudflare)cf-cache-status: DYNA…Sending b…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.