kudulab / dojo

Containerize your development and operations environment
Apache License 2.0
295 stars 19 forks source link

docker-compose: command not found #42

Open kief opened 2 weeks ago

kief commented 2 weeks ago

Hi folks!

kmorris@Kiefs-MacBook-Pro:~/src/spin/website-stack$ which docker-compose
/opt/homebrew/bin/docker-compose
kmorris@Kiefs-MacBook-Pro:~/src/spin/website-stack$ dojo
2024/06/21 15:56:41 [ 1]  INFO: (main.main) Dojo version 0.13.0
panic: Unexpected error: Command: docker-compose version --short
  Exit status: 127
  StdOut: <empty string>
  StdErr: bash: line 1: docker-compose: command not found

goroutine 1 [running]:
main.GetDockerComposeVersion({0x116a868?, 0xc0000c6080?})
    /dojo/work/src/dojo/docker_compose_driver.go:47 +0xf6
main.main()
    /dojo/work/src/dojo/main.go:92 +0x259

My Dojofile looks like:

DOJO_DOCKER_IMAGE="kiefm/spin-tools-dojo:latest"
DOJO_DRIVER="docker-compose"
DOJO_DOCKER_COMPOSE_FILE="docker-compose.yml"
kief commented 2 weeks ago

Poking around in the dojo code, I see where the BashShellService is created and used, but it looks to me like it sets the environment for the shell to an empty string array. I assume it would pick the environment (including PATH) from the parent shell, but I don't know enough about golang to work it out.