cisagov / decider

A web application that assists network defenders, analysts, and researchers in the process of mapping adversary behaviors to the MITRE ATT&CK® framework.
Other
1.07k stars 117 forks source link

error when building docker - error="git was not found in the system: exec: \"git.exe\": executable file not found in %PATH%" #79

Closed Roydv007 closed 6 months ago

Roydv007 commented 8 months ago

🐛 Summary

I have been running into the below error when running docker compose for the first time.

level=warning msg="current commit information was not captured by the build" error="git was not found in the system: exec: \"git.exe\": executable file not found in %PATH%" failed to solve: lstat /var/lib/docker/tmp/buildkit-mount2052740645/docker/web/root_files: no such file or directory

image

damionmounts commented 8 months ago

Hello,

What system is this being run on?

It appears to be Windows to me - otherwise locating git.exe wouldn't make much sense.
I see buildkit mentioned too - which is "the default builder for users on Docker Desktop, and Docker Engine".

Is Git installed and on PATH?

It seems like Docker may not be able to find Git.
Installing it, or editing your path variable, may fix the issue.

damionmounts commented 6 months ago

Closing due to inactivity - always happy to re-open if needed.

omaryupio commented 2 months ago

How did you solve this?

damionmounts commented 2 months ago

Install Git for Windows

Git must be installed on Windows for git.exe to be available. https://git-scm.com/download/win

Ensure Git is on PATH

If Git is installed, but cannot be found when calling it from Command Prompt / PowerShell, then it needs to be added to PATH. One can search for "path" in the Start Menu and use these settings to adjust the PATH variable. image

There are online tutorials for adding programs to PATH - adding Python is a common one, as sometimes people forget to check the "Add to Path" setting on the install wizard. In fact - Git may have that option.