Take a (trivial) Dockerfile:
FROM scratch
COPY *.xyz .
I would expect this to include any xyz files if present.
So testing with no xyz files - it builds fine locally:
% docker build .
{...}
[+] Building 0.0s (5/5) FINISHED
But if I submit the same Dockerfile via the API:
% tar -cf - Dockerfile | \
curl --unix-socket /var/run/docker.sock -H "Content-Type: application/x-tar" --data-binary @- "http://localhost:1/build"
{...}
{"errorDetail":{"message":"COPY failed: no source files were specified"},"error":"COPY failed: no source files were specified"}