When building an image in a git folder, it's possible to see such warning:
WARNING: failed to get git commit: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
To reproduce:
- Create a folder
- Run
git init
- Don't commit anything
- Run
echo "FROM scratch" | BUILDX_GIT_LABELS=full docker buildx build -f- .
When building an image in a git folder, it's possible to see such warning:
To reproduce:
git initecho "FROM scratch" | BUILDX_GIT_LABELS=full docker buildx build -f- .