Skip to content

Commit

Permalink
terraform deployer: silent gcloud SDK installation
Browse files Browse the repository at this point in the history
Reduce output from gcloud SDK installation process, by silencing the
various steps.

This is needed to reduce image build log verbosity; gcloud SDK
installation output is also difficult to read on terminal that do not
support colours.
  • Loading branch information
endorama committed Jan 26, 2022
1 parent 8916106 commit 9e89706
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/install/_static/Dockerfile.terraform_deployer
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ FROM hashicorp/terraform:light as terraform

FROM python:3-alpine

# required by gcloud SDK
RUN apk add --no-cache git openssh curl

# Announcements for new releases: https://groups.google.com/g/google-cloud-sdk-announce
ENV GCLOUD_SDK_VERSION 369.0.0
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin
RUN curl "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$GCLOUD_SDK_VERSION-linux-x86_64.tar.gz" > /tmp/google-cloud-sdk.tar.gz \
RUN curl --silent "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$GCLOUD_SDK_VERSION-linux-x86_64.tar.gz" > /tmp/google-cloud-sdk.tar.gz \
&& mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh -q --override-components="bq" \
&& tar -C /usr/local/gcloud -xf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh -q --override-components="bq" &>/dev/null \
&& rm /tmp/google-cloud-sdk.tar.gz

HEALTHCHECK --timeout=3s CMD sh -c "[ -f /tmp/tf-applied ]"
Expand Down

0 comments on commit 9e89706

Please sign in to comment.