Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
The WARNING: buildx: git was not found in the system. Current commit information was not captured by the build
warning appears on systems without git installed even if attestations are disabled with --provenance=false
and --sbom=false
.
I'm presuming attestations are the cause, but there's no documentation for this warning and the documentation on just how attestations data is gathered is fairly threadbare. The fact that this warning gives no indication of why it's a problem and why buildx is complaining about not finding git and what to do to remedy the situation if git not being available is correct behaviour suggests that either the warning and/or documentation is inadequate.
Expected behaviour
If attestations are switched off, buildx shouldn't be trying to gather data for them.
Actual behaviour
Warning generated suggests that attestations data is being gathered regardless of whether it's enabled or not.
Buildx version
github.com/docker/buildx v0.10.4 c513d34
Docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.4
Path: /usr/libexec/docker/cli-plugins/docker-buildx
Server:
Containers: 3
Running: 2
Paused: 0
Stopped: 1
Images: 42
Server Version: 24.0.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc version: v1.1.7-0-g860f061
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.49-linuxkit-pr
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.841GiB
Name: docker-desktop
ID: a7556ca5-8fa3-4032-8a01-d9b50ca2c610
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 70
Goroutines: 102
System Time: 2023-06-14T18:19:57.576077242Z
EventsListeners: 11
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false
Builders list
default * docker
default default running v0.11.7-0.20230525183624-798ad6b0ce9f linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
Configuration
Not applicable.
Build logs
No response
Additional info
Reproduced with a git source tree copied over to a minimal build system without git installed, then docker build
ran.