Skip to content

Instantly share code, notes, and snippets.

@enocom
Created December 26, 2017 16:38
Show Gist options
  • Save enocom/a1024bff4341d4fa852273050df4977c to your computer and use it in GitHub Desktop.
Save enocom/a1024bff4341d4fa852273050df4977c to your computer and use it in GitHub Desktop.
function gcloud {
if ! docker inspect gcloud-config > /dev/null 2>&1; then
docker run -it --name gcloud-config -v "$PWD:/pwd" google/cloud-sdk:alpine gcloud auth login
fi
docker run -it --rm --volumes-from gcloud-config -v "$PWD:/pwd" google/cloud-sdk:alpine gcloud $@
}
function aws {
if ! docker inspect aws-config > /dev/null 2>&1; then
docker run -it --name aws-config -v "$PWD:/pwd" mesosphere/aws-cli configure
fi
docker run -it --rm --volumes-from aws-config -v "$PWD:/pwd" mesosphere/aws-cli $@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment