From e47b0cd446dd994c2bf2923b9a514012fb3d9511 Mon Sep 17 00:00:00 2001 From: spengreb Date: Thu, 1 Dec 2022 15:07:28 +0100 Subject: [PATCH] docker will always get latest terraform version --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc8f607..07e5eb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:xenial +FROM python:latest -RUN apt-get update -y && apt-get install -y python3 wget unzip git -RUN wget -O /tmp/terraform.zip https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip +RUN apt update && apt install -y jq +RUN wget -O /tmp/terraform.zip `echo "https://releases.hashicorp.com/terraform/$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')/terraform_$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')_linux_amd64.zip"` RUN unzip /tmp/terraform.zip RUN mv terraform /usr/bin/