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

Added basic checks to ensure the correct version of Docker Compose is installed. #155

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

felix-caboff
Copy link

Safety check to ensure the correct version of docker compose is installed. Used the existing docker detection logic to ensure that the correct version is found.

Safety check to ensure the correct version of docker compose is installed
@felix-caboff felix-caboff requested a review from a team as a code owner December 21, 2023 14:20
@edznux-dd
Copy link
Contributor

Hey thanks for the PR.
I'm not sure the string matching is correct?
I have Docker Compose version v2.21.0 on my machine, so it doesn't match grep '^Docker Compose version 2' what do you have on yours?

scripts/kubehound.sh Outdated Show resolved Hide resolved
even better safety check.

Co-authored-by: Edouard Schweisguth <edouard.schweisguth@datadoghq.com>
@@ -31,6 +31,12 @@ check_docker() {
exit 1
fi

if ! [ "$(docker compose version | grep '^Docker Compose version v2')" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about when v3 is released?

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

Successfully merging this pull request may close these issues.

None yet

3 participants