diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index efbaed89..586a473a 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -132,12 +132,23 @@ RUN bash ./tdnfinstall.sh \ xauth \ screen \ postgresql-devel \ - terraform \ gh \ redis \ cpio \ gettext +# Install Terraform + +RUN TF_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M ".current_version") \ + && wget -nv -O terraform.zip "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip" \ + && wget -nv -O terraform.sha256 "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_SHA256SUMS" \ + && echo "$(grep "${TF_VERSION}_linux_amd64.zip" terraform.sha256 | awk '{print $1}') terraform.zip" | sha256sum -c \ + && unzip terraform.zip \ + && mv terraform /usr/local/bin/terraform \ + && rm -f terraform.zip terraform.sha256 \ + && unset TF_VERSION + + # Install azure-functions-core-tools RUN wget -nv -O Azure.Functions.Cli.zip `curl -fSsL https://api.github.com/repos/Azure/azure-functions-core-tools/releases/latest | grep "url.*linux-x64" | grep -v "sha2" | cut -d '"' -f4` \ && unzip -d azure-functions-cli Azure.Functions.Cli.zip \ diff --git a/linux/terraform/terraform b/linux/terraform/terraform deleted file mode 100644 index 25679a07..00000000 --- a/linux/terraform/terraform +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -e - -export ARM_SUBSCRIPTION_ID=`az account show --output=json | jq -r -M '.id'` -export ARM_TENANT_ID=`az account show --output=json | jq -r -M '.tenantId'` - -export ARM_MSI_ENDPOINT=$MSI_ENDPOINT -if [ -z "$ARM_MSI_ENDPOINT" ]; then - export ARM_USE_MSI=false -else - export ARM_USE_MSI=true -fi -export PATH=/usr/local/terraform:$PATH - -terraform "$@"