Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

horusec cli error: Docker not found #1155

Open
matheussilvaprimo opened this issue Aug 3, 2023 · 12 comments
Open

horusec cli error: Docker not found #1155

matheussilvaprimo opened this issue Aug 3, 2023 · 12 comments

Comments

@matheussilvaprimo
Copy link

matheussilvaprimo commented Aug 3, 2023

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

@joaovmlima
Copy link

Same exact behavior is happening on Github Actions

@smoogie
Copy link
Contributor

smoogie commented Aug 7, 2023

It is probably the same as here: #1154

@renatovieiradesouza
Copy link

Same error here!

@renatovieiradesouza
Copy link

The error still persists, do I need to adjust the version? I didn't see any new releases

@smoogie
Copy link
Contributor

smoogie commented Aug 8, 2023

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.

@denisgolius
Copy link

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
Copy link

My pipeline github action not working

image

@thiagosanches
Copy link

Same here, tested with a bare ubuntu-latest image and it has the docker installed, however it fails on horusec:
image

@smoogie
Copy link
Contributor

smoogie commented Aug 9, 2023

@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.
image

If you check the command that you run to install horusec you select "latest" version:
image
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 :)

@thiagosanches
Copy link

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.

@gilsdav
Copy link

gilsdav commented Oct 13, 2023

I got same error but when using podman. And docker commandes works perfectly.

@savire
Copy link

savire commented Oct 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants