-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (20 loc) · 1012 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM gcr.io/cloud-builders/gcloud
ENV TERRAFORM_VERSION=0.11.13
ENV TERRAFORM_VERSION_SHA256SUM=5925cd4d81e7d8f42a0054df2aafd66e2ab7408dbed2bd748f0022cfe592f8d2
ENV PATH=$PATH:/builder/google-cloud-sdk/bin/
RUN git config --system credential.helper gcloud.sh
RUN apt-get update && \
apt-get -y install curl unzip ca-certificates && \
curl https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
> terraform_linux_amd64.zip && \
echo "${TERRAFORM_VERSION_SHA256SUM} terraform_linux_amd64.zip" > terraform_SHA256SUMS && \
sha256sum -c terraform_SHA256SUMS --status && \
unzip terraform_linux_amd64.zip -d /builder/terraform && \
rm -f terraform_linux_amd64.zip && \
apt-get remove --purge -y curl unzip && \
apt-get --purge -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV PATH=/builder/terraform/:$PATH
COPY entrypoint.bash /builder/entrypoint.bash
ENTRYPOINT ["/builder/entrypoint.bash"]