What is the build context and why does it matter?
BeginnerConceptDockerfile Instructions & Builds
Answer
It is the directory (or URL/tar) sent to the builder, the . in docker build .. Only files inside it can be COPYd. A big context slows every build and can leak secrets; control it with .dockerignore. BuildKit sends only the files actually referenced, incrementally.