brew install ekristen/tap/gcp-nukeYou can download pre-compiled binaries from the releases page.
Registries:
Mount your local gcloud configuration into the container:
docker run --rm \
-v ~/.config/gcloud:/home/gcp-nuke/.config/gcloud:ro \
-v "$(pwd)/config.yaml:/config.yaml:ro" \
ghcr.io/ekristen/gcp-nuke:v1.11.0 \
run --config /config.yaml --project-id playground-12345Mount the service account JSON file and set GOOGLE_APPLICATION_CREDENTIALS:
docker run --rm \
-v "$(pwd)/credentials.json:/credentials.json:ro" \
-v "$(pwd)/config.yaml:/config.yaml:ro" \
-e GOOGLE_APPLICATION_CREDENTIALS=/credentials.json \
ghcr.io/ekristen/gcp-nuke:v1.11.0 \
run --config /config.yaml --project-id playground-12345Pass credentials directly via environment variable without mounting files:
docker run --rm \
-v "$(pwd)/config.yaml:/config.yaml:ro" \
-e GOOGLE_APPLICATION_CREDENTIALS_JSON \
ghcr.io/ekristen/gcp-nuke:v1.11.0 \
run --config /config.yaml --project-id playground-12345To compile gcp-nuke from source you need a working Golang development environment and goreleaser.
gcp-nuke uses go modules and so the clone path should not matter. Then simply change directory into the clone and run:
goreleaser build --clean --snapshot --single-target