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

Incorrect check in Makefile #1018

Open
Michal-Szczepaniak opened this issue Aug 8, 2024 · 5 comments
Open

Incorrect check in Makefile #1018

Michal-Szczepaniak opened this issue Aug 8, 2024 · 5 comments

Comments

@Michal-Szczepaniak
Copy link

In the Makefile file, there's a check that checks if docker exists, but the issue is that you used DOCKER_COMPOSE variable

@which $(DOCKER_COMPOSE) > /dev/null || (echo "Please install docker compose binary" && exit 1)

and DOCKER_COMPOSE variable consists of docker compose which in turn causes which docker compose command, and while docker command exists, compose command does not exist because its parameter to the docker command, so the check fails and currently make init will always fail on every system unless they somehow got command named compose

@bwmirek
Copy link

bwmirek commented Aug 14, 2024

for quick workaround, until its solved, just update the check

@$(DOCKER_COMPOSE) version > /dev/null || (echo "Please install docker compose binary" && exit 1)

@Michal-Szczepaniak
Copy link
Author

I think the better solution would be @which docker > /dev/null

@bwmirek
Copy link

bwmirek commented Aug 14, 2024

this would check if docker is installed but we want to check specifically if docker compose is installed, as they are different things and can be installed separately

@Michal-Szczepaniak
Copy link
Author

Then check if /usr/lib/docker/cli-plugins/docker-compose exists

@bwmirek
Copy link

bwmirek commented Aug 14, 2024

i'm afraid it won't work either, docker may be installed in different places, especially if you install the desktop version

for example on my current machine docker is under /usr/local/docker and on my windows machine it is /mnt/c/Program Files/Docker/Docker

imo docker compose version is safer bet as it only requires to set correct $PATH

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

2 participants