horusec cli error: Docker not found
matheussilvaprimo opened this issue · 12 comments
What happened:
Azure DevOps pipelines breaks while attempting to run the command horusec start -p ./
right after pulling the installation script from https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh
for versions v2.7.1 or v2.8.0.
I have tried using both ubuntu-latest and ubuntu-20.04 for vmImage but without success.
Error output
Version set to v2.7.1
Installing Horusec for Linux amd64
Downloading horusec...
https://github.com/ZupIT/horusec/releases/download/v2.7.1/horusec_linux_amd64
Horusec was downloaded and moved to /usr/local/bin/horusec
Version: v2.7.1
Git commit: 815c7fbe1a7a25010287787bec2c2e564870d56d
Built: Mon Feb 14 12:59:12 2022
Distribution: normal
time="2023-08-03T16:08:30Z" level=error msg="{HORUSEC_CLI} Your docker version is below of: " error=19.3
Error: docker not found. Please check and try again
Same exact behavior is happening on Github Actions
Same error here!
The error still persists, do I need to adjust the version? I didn't see any new releases
Hi, the fix that worked for me is in the pre-release version v2.9.0-beta.3. You can test it locally - to install it on Mac/Linux run:
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/master/deployments/scripts/install.sh | bash -s latest-beta
I hope it will solve your issue.
Hi, the fix that worked for me is in the pre-release version v2.9.0-beta.3. You can test it locally - to install it on Mac/Linux run:
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/master/deployments/scripts/install.sh | bash -s latest-beta
I hope it will solve your issue.
Latest-beta version works as expected and issue with docker has gone.
Thanks!
@renatovieiradesouza From this what I see in the screenshot, you have horusec version2.8.0, and a fix is available in v2.9.0-beta.3.
If you check the command that you run to install horusec you select "latest" version:
Try to use "latest-beta" instead - replace:
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/v2.9.0-beta.3/deployments/scripts/install.sh | bash -s latest
with
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest-beta
Explanation:
You changed the location where you read the install script. But the install script had not changed. If you call install.sh
it still works the same. So changing https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh
to https://raw.githubusercontent.com/ZupIT/horusec/v2.9.0-beta.3/deployments/scripts/install.sh
or https://raw.githubusercontent.com/ZupIT/horusec/v2.9.0-beta.2/deployments/scripts/install.sh
, etc. would not change version of horusec you install.
Installation script installs versions based on the argument you pass to it that defines the version to install. We have options: "latest", "latest-beta" and "latest-rc". The script reads tags set on the repo and tries to find the "latest" version (https://api.github.com/repos/ZupIT/horusec/releases/latest), the last version with "-beta." string (from git tags), and the last version with "-rc." string (from git tags). Currently, it is v2.8.0 for "latest", v2.9.0-beta.3 for "latest-beta" and v2.8.0-rc.1 for "latest-rc". Depending on your system and the version type you selected, it is downloaded from https://github.com/ZupIT/horusec/releases/...
For example, if you are using Linux with amd64 and pass "latest" (like we see on your screenshot), you get:
https://github.com/ZupIT/horusec/releases/download/latest/horusec_linux_amd64
If you, for example, use Linux with amd64 and pass "latest-beta" you would currently get version:
https://github.com/ZupIT/horusec/releases/download/v2.9.0-beta.3/horusec_linux_amd64
For more details, please check: https://github.com/ZupIT/horusec/blob/main/deployments/scripts/install.sh
I hope it explains it and that version 2.9.0-beta.3 will work for you :)
@thiagosanches
Your case is similar - you also use the version that has an error. Try to replace:
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest
with
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest-beta
I hope it will help :)
Guys, do you have any plan to make it work on latest
tag? The reason I'm bringing this up is that this change isn't confined to just a single repository; it requires updates in multiple places.
Thank you,
Regards.
I got same error but when using podman. And docker commandes works perfectly.
If the install script does not work for you even with the latest-beta
switch just download the specific rpm or install package file into your system and use your package manager to install it locally.