2016-05-17 05:06:27 +02:00
|
|
|
FROM python:2-alpine
|
|
|
|
|
2018-06-18 19:00:20 +02:00
|
|
|
ENV PATH $PATH:/usr/src/google-cloud-sdk/bin
|
2018-12-18 16:51:49 +01:00
|
|
|
ENV CLOUD_SDK_DOCKER_VERSION 228.0.0
|
2018-06-18 19:00:20 +02:00
|
|
|
|
2016-05-17 05:06:27 +02:00
|
|
|
RUN set -x \
|
|
|
|
&& apk add --no-cache --virtual .build-deps \
|
|
|
|
curl \
|
|
|
|
ca-certificates \
|
|
|
|
tar \
|
2018-06-18 19:00:20 +02:00
|
|
|
&& curl -sSL -o /tmp/google-cloud-sdk.tar.gz "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_DOCKER_VERSION}-linux-x86_64.tar.gz" \
|
2016-05-17 05:06:27 +02:00
|
|
|
&& mkdir -p /usr/src/google-cloud-sdk \
|
|
|
|
&& tar -xzf /tmp/google-cloud-sdk.tar.gz -C /usr/src/google-cloud-sdk --strip-components 1 \
|
|
|
|
&& rm /tmp/google-cloud-sdk.tar.gz \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/google-cloud-sdk \
|
|
|
|
&& ./install.sh \
|
|
|
|
--usage-reporting false \
|
2018-06-18 19:00:20 +02:00
|
|
|
--path-update false \
|
2016-05-17 05:06:27 +02:00
|
|
|
) \
|
2018-06-18 19:00:20 +02:00
|
|
|
&& apk del .build-deps \
|
|
|
|
&& gcloud components update \
|
|
|
|
&& gcloud version
|
2016-05-17 05:06:27 +02:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
2016-05-27 23:24:17 +02:00
|
|
|
ENTRYPOINT ["gcloud"]
|