🦔
Dockerfileでgcloud CLIをインストール
手順
Dockerfileに下記を記述
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg \
&& apt-get update -y \
&& apt-get install google-cloud-sdk -y
ENV CLOUDSDK_CORE_PROJECT = YOUR_PROJECT_NAME
Dockerを立ち上げたあとDockerの中で
gcloud auth application-default login
を実行
参考
Discussion