googleapis/testing-infra-docker

Determine Cloud SDK (gcloud) version update strategy

busunkim96 opened this issue · 0 comments

Some images always install the latest version of Cloud SDK. Others use a pinned version.

Make a decision as to which option is more appropriate and make this consistent across the images.

Latest (using installer):

curl -sSL https://sdk.cloud.google.com | bash -s -- --install-dir=/usr/local/gcloud

Pinned (using versioned archive):

ENV CLOUD_SDK_VERSION 253.0.0
# Use system python for cloud sdk.
ENV CLOUDSDK_PYTHON /usr/bin/python
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
RUN tar xzf google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
RUN /google-cloud-sdk/install.sh
ENV PATH /google-cloud-sdk/bin:$PATH

Installation guide:
https://cloud.google.com/sdk/docs/downloads-interactive