Skip to content

Instantly share code, notes, and snippets.

@david-zw-liu
Forked from oofnikj/get_cloud.sh
Last active September 23, 2025 03:49
Show Gist options
  • Save david-zw-liu/a473811f974227e1fee94ef6b0f90a85 to your computer and use it in GitHub Desktop.
Save david-zw-liu/a473811f974227e1fee94ef6b0f90a85 to your computer and use it in GitHub Desktop.
Download and install latest google-cloud-sdk on Alpine
#!/bin/sh -e
######
# Tested with various flavors of Alpine, Ubuntu and Debian. CentOS / RedHat not supported (yet).
# Use:
# wget -qO- https://gist.githubusercontent.com/david-zw-liu/a473811f974227e1fee94ef6b0f90a85/raw | sh
######
export SDK_DIR=/usr/local/lib
apk update && apk add wget curl python3 ca-certificates || true
wget -qO- "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz" | tar xzf - -C $SDK_DIR
/usr/local/lib/google-cloud-sdk/install.sh --quiet
echo "Please run: export PATH=$SDK_DIR/google-cloud-sdk/bin:\$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment