-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gcloud): add
gcloud
and gcloud-login
commands
1. run `script.sh` to install the new commands. 2. run `gcloud-login` to authorize your CLI make changes on you account. 3. run `gcloud` to have fun. Closes #18
- Loading branch information
1 parent
445e4c7
commit 76436ae
Showing
4 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
IMAGE=eu.gcr.io/google.com/cloudsdktool/google-cloud-cli:latest | ||
WORKDIR=/app | ||
|
||
# run from your working directory | ||
docker run -it --rm \ | ||
--volume $PWD:$WORKDIR \ | ||
--volumes-from gcloud-config \ | ||
--workdir $WORKDIR \ | ||
--entrypoint gcloud \ | ||
$IMAGE "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
IMAGE=eu.gcr.io/google.com/cloudsdktool/google-cloud-cli:latest | ||
WORKDIR=/app | ||
|
||
# Remove previous auth configs | ||
if [[ $(docker ps --all | grep gcloud-config) ]]; then | ||
echo "Removing previous $(gcloud-config) container..." | ||
docker rm gcloud-config | ||
fi | ||
|
||
# run from your working directory | ||
docker run -it \ | ||
--volume $PWD:$WORKDIR \ | ||
--workdir $WORKDIR \ | ||
--entrypoint gcloud \ | ||
--name gcloud-config \ | ||
$IMAGE auth login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters