diff --git a/Dockerfile/full-alpine-amd64 b/Dockerfile/full-alpine-amd64 index dcf7b13..d4f9912 100644 --- a/Dockerfile/full-alpine-amd64 +++ b/Dockerfile/full-alpine-amd64 @@ -3,18 +3,18 @@ FROM alpine:latest RUN apk update && \ apk upgrade && \ apk add --update --no-cache \ - curl \ - bash \ - jq \ - yq \ - figlet \ - unzip \ - zip \ - git \ - shellcheck \ - nano \ - tar && \ - rm -rf /var/cache/apk/* + curl \ + bash \ + jq \ + yq \ + figlet \ + unzip \ + zip \ + git \ + shellcheck \ + nano \ + tar && \ + rm -rf /var/cache/apk/* # Install languages, libraries and frameworks RUN apk add --update \ @@ -71,7 +71,9 @@ RUN wget -nv https://github.com/terraform-linters/tflint/releases/download/v${tf && rm tflint_linux_amd64.zip # Install tfsec (https://github.com/aquasecurity/tfsec) -RUN export tfsecrelease="$(curl --silent "https://api.github.com/repos/aquasecurity/tfsec/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" -RUN wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 -RUN mv tfsec-linux-amd64 /usr/bin/tfsec && chmod +x /usr/bin/tfsec -RUN tfsec --version +RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \ + && echo "Installing tfsec v${tfsecrelease}" \ + && wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \ + && mv tfsec-linux-amd64 /usr/bin/tfsec \ + && chmod +x /usr/bin/tfsec + diff --git a/Dockerfile/full-ubuntu-amd64 b/Dockerfile/full-ubuntu-amd64 index cf691c4..9c1f73c 100644 --- a/Dockerfile/full-ubuntu-amd64 +++ b/Dockerfile/full-ubuntu-amd64 @@ -3,19 +3,19 @@ FROM ubuntu:latest RUN apt update -yq && \ apt upgrade -yq && \ apt install -yq --no-install-recommends --no-install-suggests \ - ca-certificates \ - apt-transport-https \ - wget \ - curl \ - bash \ - jq \ - figlet \ - unzip \ - zip \ - git \ - shellcheck \ - nano \ - tar + ca-certificates \ + apt-transport-https \ + wget \ + curl \ + bash \ + jq \ + figlet \ + unzip \ + zip \ + git \ + shellcheck \ + nano \ + tar # Install languages, libraries and frameworks RUN apt install -yq --no-install-recommends --no-install-suggests \ @@ -73,7 +73,8 @@ RUN wget -nv https://github.com/terraform-linters/tflint/releases/download/v${tf && rm tflint_linux_amd64.zip # Install tfsec (https://github.com/aquasecurity/tfsec) -RUN export tfsecrelease="$(curl --silent "https://api.github.com/repos/aquasecurity/tfsec/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" -RUN wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 -RUN mv tfsec-linux-amd64 /usr/bin/tfsec && chmod +x /usr/bin/tfsec -RUN tfsec --version +RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \ + && echo "Installing tfsec v${tfsecrelease}" \ + && wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \ + && mv tfsec-linux-amd64 /usr/bin/tfsec \ + && chmod +x /usr/bin/tfsec diff --git a/Dockerfile/standard-alpine-amd64 b/Dockerfile/standard-alpine-amd64 index 0c264cd..85db991 100644 --- a/Dockerfile/standard-alpine-amd64 +++ b/Dockerfile/standard-alpine-amd64 @@ -3,17 +3,17 @@ FROM alpine:latest RUN apk update && \ apk upgrade && \ apk add --update --no-cache \ - curl \ - bash \ - jq \ - yq \ - figlet \ - unzip \ - zip \ - git \ - shellcheck \ - nano && \ - rm -rf /var/cache/apk/* + curl \ + bash \ + jq \ + yq \ + figlet \ + unzip \ + zip \ + git \ + shellcheck \ + nano && \ + rm -rf /var/cache/apk/* # Install terraform (https://github.com/hashicorp/terraform) RUN export tfrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/hashicorp/terraform/releases/latest | awk -F / '{print substr($NF,2);}')" \ @@ -31,8 +31,9 @@ RUN export atmosrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://git && chmod +x /usr/bin/atmos # Install tfsec (https://github.com/aquasecurity/tfsec) -RUN export tfsecrelease="$(curl --silent "https://api.github.com/repos/aquasecurity/tfsec/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" -RUN wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 -RUN mv tfsec-linux-amd64 /usr/bin/tfsec && chmod +x /usr/bin/tfsec -RUN tfsec --version +RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \ + && echo "Installing tfsec v${tfsecrelease}" \ + && wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \ + && mv tfsec-linux-amd64 /usr/bin/tfsec \ + && chmod +x /usr/bin/tfsec diff --git a/Dockerfile/standard-ubuntu-amd64 b/Dockerfile/standard-ubuntu-amd64 index 9165a8f..b0a8b39 100644 --- a/Dockerfile/standard-ubuntu-amd64 +++ b/Dockerfile/standard-ubuntu-amd64 @@ -3,18 +3,18 @@ FROM ubuntu:latest RUN apt update -yq && \ apt upgrade -yq && \ apt install -yq --no-install-recommends --no-install-suggests \ - ca-certificates \ - wget \ - curl \ - bash \ - jq \ - figlet \ - unzip \ - zip \ - git \ - shellcheck \ - nano && \ - rm -rf /var/lib/apt/lists/* + ca-certificates \ + wget \ + curl \ + bash \ + jq \ + figlet \ + unzip \ + zip \ + git \ + shellcheck \ + nano && \ + rm -rf /var/lib/apt/lists/* # Install terraform (https://github.com/hashicorp/terraform) RUN export tfrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/hashicorp/terraform/releases/latest | awk -F / '{print substr($NF,2);}')" \ @@ -32,7 +32,9 @@ RUN export atmosrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://git && chmod +x /usr/bin/atmos # Install tfsec (https://github.com/aquasecurity/tfsec) -RUN export tfsecrelease="$(curl --silent "https://api.github.com/repos/aquasecurity/tfsec/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" -RUN wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 -RUN mv tfsec-linux-amd64 /usr/bin/tfsec && chmod +x /usr/bin/tfsec -RUN tfsec --version +RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \ + && echo "Installing tfsec v${tfsecrelease}" \ + && wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \ + && mv tfsec-linux-amd64 /usr/bin/tfsec \ + && chmod +x /usr/bin/tfsec +