Created
July 19, 2019 11:21
-
-
Save veggiemonk/3a62004b84cb2508937e59e1a2bd736b to your computer and use it in GitHub Desktop.
Atlantis terragrunt terraform and gcloud container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS builder | |
ENV TERRAGRUNT_VERSION=0.19.9 \ | |
TERRAGRUNT_VERSION_SHA256SUM=9226cffc6b67b48c78e659b8ed1228e41b01c6fa4bd55e26e3b56c4d488db7ea \ | |
TERRAFORM_VERSION=0.12.5 \ | |
TERRAFORM_VERSION_SHA256SUM=babb4a30b399fb6fc87a6aa7435371721310c2e2102a95a763ef2c979ab06ce2 | |
WORKDIR /go/src/github.com/runatlantis/atlantis/ | |
RUN apk --no-cache add \ | |
curl \ | |
git \ | |
dep \ | |
ca-certificates \ | |
unzip \ | |
&& 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 \ | |
&& unzip terraform_linux_amd64.zip \ | |
&& curl -sSL https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64 > terragrunt \ | |
&& echo "${TERRAGRUNT_VERSION_SHA256SUM} terragrunt" > terragrunt_SHA256SUMS \ | |
&& sha256sum -c terragrunt_SHA256SUMS \ | |
&& curl -sSL https://github.com/runatlantis/atlantis/releases/download/v0.8.2/atlantis_linux_amd64.zip > atlantis_linux_amd64.zip \ | |
&& unzip atlantis_linux_amd64.zip | |
#COPY . . | |
#RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o atlantis . | |
FROM runatlantis/atlantis:latest | |
#FROM runatlantis/atlantis:v0.8.2 | |
ARG CLOUD_SDK_VERSION=253.0.0 | |
ENV CLOUD_SDK_VERSION=$CLOUD_SDK_VERSION | |
ENV PATH /google-cloud-sdk/bin:$PATH | |
COPY --from=builder /go/src/github.com/runatlantis/atlantis/terraform /usr/local/bin/terraform | |
COPY --from=builder /go/src/github.com/runatlantis/atlantis/terragrunt /usr/local/bin/terragrunt | |
#COPY --from=builder /go/src/github.com/runatlantis/atlantis/atlantis /usr/local/bin/atlantis | |
RUN apk --no-cache add \ | |
curl \ | |
python \ | |
py-crcmod \ | |
bash \ | |
libc6-compat \ | |
openssh-client \ | |
git \ | |
gnupg \ | |
ca-certificates \ | |
&& curl -OL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \ | |
&& tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \ | |
&& rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \ | |
&& ln -s /lib /lib64 \ | |
&& gcloud components install beta \ | |
&& gcloud components install kubectl \ | |
&& gcloud config set core/disable_usage_reporting true \ | |
&& gcloud config set component_manager/disable_update_check true \ | |
&& gcloud config set metrics/environment github_docker_image \ | |
&& gcloud --version | |
#COPY cloudrun-docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh | |
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh | |
ENTRYPOINT ["docker-entrypoint.sh"] | |
CMD ["server"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment