Skip to content
Snippets Groups Projects
Commit 9189f632 authored by Will McCutchen's avatar Will McCutchen
Browse files

Add bin/gcloud wrapper script

parent 3fadb26d
Branches
Tags
No related merge requests found
...@@ -9,7 +9,7 @@ GCLOUD_PROJECT ?= httpbingo ...@@ -9,7 +9,7 @@ GCLOUD_PROJECT ?= httpbingo
GCLOUD_ACCOUNT ?= mccutchen@gmail.com GCLOUD_ACCOUNT ?= mccutchen@gmail.com
# Run gcloud in a container to avoid needing to install the SDK locally # Run gcloud in a container to avoid needing to install the SDK locally
GCLOUD_COMMAND ?= docker run --rm -ti --workdir /code -v $$PWD:/code -v $$HOME/.config/gcloud:/root/.config/gcloud google/cloud-sdk gcloud GCLOUD_COMMAND ?= ./bin/gcloud
# Built binaries will be placed here # Built binaries will be placed here
DIST_PATH ?= dist DIST_PATH ?= dist
......
#!/bin/bash
#
# A wrapper that executes the gcloud CLI in a docker container, to avoid
# requiring a local installation.
#
# Adapted from this helpful blog post:
# https://blog.scottlowe.org/2018/09/13/running-gcloud-cli-in-a-docker-container/
exec docker run \
--rm \
-ti \
--workdir /code \
-v $PWD:/code \
-v $HOME/.config/gcloud:/root/.config/gcloud \
google/cloud-sdk gcloud $*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment