-
Notifications
You must be signed in to change notification settings - Fork 190
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
[docker]:[feature] - Validate Docker version from the Docker API #965
[docker]:[feature] - Validate Docker version from the Docker API #965
Conversation
Signed-off-by: Luis Guilherme de A <luisguilhermepdea@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Validate
function could be simplified to this:
version, err := validateIfDockerIsInstalled()
if err != nil {
return err
}
return validateIfDockerIsRunningInMinVersion(version)
}
And validateIfDockerIsSupported
could be removed.
Signed-off-by: Luis Guilherme de A <luisguilhermepdea@gmail.com>
…getDockerVersion Signed-off-by: Luis Guilherme de A <luisguilhermepdea@gmail.com>
Signed-off-by: Luis Guilherme de A <luisguilhermepdea@gmail.com>
Signed-off-by: Luis Guilherme de A <luisguilhermepdea@gmail.com>
Requested changes done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks very much for your contribution @luiguip
closes #963 |
Signed-off-by: Luis Guilherme de A luisguilhermepdea@gmail.com
- What I did
I changed the way the version of docker is retrieved, from a shell command execution to Docker API.
This pull-request solves the issue #757
- How to verify it
With the docker running, run the horusec and it will validate the Docker version, from the Docker API.
- Description for the changelog
The log error message of an error with the docker validation had changed. Now few steps of preprocessing are necessary to retrieve the version.