|
| 1 | +FROM mcr.microsoft.com/devcontainers/base:bullseye |
| 2 | +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ |
| 3 | + && apt-get -y install git ca-certificates curl apt-transport-https lsb-release gnupg \ |
| 4 | + python-is-python3 python3-pip gnupg software-properties-common |
| 5 | +RUN wget -O- https://apt.releases.hashicorp.com/gpg | \ |
| 6 | + gpg --dearmor | \ |
| 7 | + sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg |
| 8 | +RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ |
| 9 | + sudo tee /etc/apt/sources.list.d/hashicorp.list |
| 10 | +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \ |
| 11 | + sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ |
| 12 | + && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ |
| 13 | + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null |
| 14 | +RUN wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb && \ |
| 15 | + sudo dpkg -i packages-microsoft-prod.deb |
| 16 | +RUN wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null && \ |
| 17 | + echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list |
| 18 | +RUN apt-get update && apt-get install -y terraform gh powershell azure-cli trivy |
| 19 | +RUN curl -L "$(curl -s https://api.github.com/repos/tenable/terrascan/releases/latest | grep -o -E "https://.+?_Linux_x86_64.tar.gz")" > terrascan.tar.gz && \ |
| 20 | + tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz && \ |
| 21 | + install terrascan /usr/local/bin && rm terrascan |
| 22 | +RUN pip install checkov pre-commit |
| 23 | +RUN curl -s https://raw.githubusercontent.com/aquasecurity/tfsec/master/scripts/install_linux.sh | bash |
| 24 | + |
0 commit comments