devops-infra / docker-terragrunt

Dockerized framework with Terraform, Terragrunt, Python, Make, Docker, Git, and all needed components to easily manage cloud infrastructure.
https://christophshyper.github.io/
MIT License
153 stars 34 forks source link

"gcloud": executable file not found in $PATH: unknown #2099

Closed nguyen-vo closed 6 months ago

nguyen-vo commented 6 months ago

:memo: Brief description

I have seen a few issues in the past regarding gcloud $PATH not found or gcloud command not found. I tried the latest version of gcp-latest, but still see the same issue.

I tried the following

docker run --rm --user $(id -u):$(id -g) --volume $(pwd):/data \
   -e GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/adc.json \
   -v $HOME/.config/gcloud/application_default_credentials.json:/tmp/keys/adc.json:ro  \
   --tty --interactive devopsinfra/docker-terragrunt:gcp-latest gcloud --version

I am expecting to able to use gcloud command

:warning: Checklist

Check CONTRIBUTING.md and CODE_OF_CONDUCT.md for more information

ChristophShyper commented 6 months ago

You're right, sorry for that. I tested only via bash. Inside Docker it can be expanded in a different way when running binaries directly. According to https://stackoverflow.com/questions/28722548/updating-path-environment-variable-permanently-in-docker-container#:~:text=1.%20The%20correct%20answer So I've added it also as ENV and it works now.

nguyen-vo commented 6 months ago

Thanks @ChristophShyper for taking a look.

When should we expect a new version for this update?

nguyen-vo commented 6 months ago

Ah nevermind I saw the new versions are published 5 hours ago!!

Very appreciated!!