From a6961ab07927b19b7c239a1d1037b83709445246 Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:02:27 +1100 Subject: [PATCH 1/4] Update Dockerfile with support for awscli v2 specific version that supports aws sso login --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8b2f0fd4..8b0eb403 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,13 @@ RUN python3.12 -m pip install --upgrade setuptools wheel RUN python3.12 -m pip install --upgrade pip -RUN python3.12 -m pip install --upgrade awscli azure-cli +RUN python3.12 -m pip install --upgrade azure-cli + +RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.18.18.zip -o awscliv2.zip && \ + unzip awscliv2.zip && \ + ./aws/install --update && \ + rm -rf aws && \ + complete -C aws_completer aws RUN git clone https://github.com/splunk/attack_range.git From cb225148d369511601463ece6fce580939cc2a4e Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:31:31 +1100 Subject: [PATCH 2/4] Update Dockerfile fix clean up of install packages for awscliv2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8b0eb403..4fab977a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN python3.12 -m pip install --upgrade azure-cli RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.18.18.zip -o awscliv2.zip && \ unzip awscliv2.zip && \ ./aws/install --update && \ - rm -rf aws && \ + rm -rf /aws && \ complete -C aws_completer aws RUN git clone https://github.com/splunk/attack_range.git From 99bc8260c19c51d4f84e3de7a4ce485557b89290 Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:37:03 +1100 Subject: [PATCH 3/4] Update Dockerfile fix aws cli completer --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4fab977a..3de77483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,7 @@ RUN python3.12 -m pip install --upgrade azure-cli RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.18.18.zip -o awscliv2.zip && \ unzip awscliv2.zip && \ ./aws/install --update && \ - rm -rf /aws && \ - complete -C aws_completer aws + rm -rf /aws RUN git clone https://github.com/splunk/attack_range.git From 30f9eb66b25f7f2b441cec4874824b2fbf5a0cf0 Mon Sep 17 00:00:00 2001 From: James Young <39607528+splunk-james@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:40:57 +1100 Subject: [PATCH 4/4] Update Dockerfile clean up installers --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3de77483..d3214f9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ RUN apt-get install -y git unzip python3-pip curl vim RUN curl -s https://releases.hashicorp.com/terraform/1.9.8/terraform_1.9.8_linux_amd64.zip -o terraform.zip && \ unzip terraform.zip && \ - mv terraform /usr/local/bin/ + mv terraform /usr/local/bin/ && \ + rm -rf /terraform.zip RUN echo 'alias python=python3.12' >> ~/.bashrc @@ -28,7 +29,8 @@ RUN python3.12 -m pip install --upgrade azure-cli RUN curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.18.18.zip -o awscliv2.zip && \ unzip awscliv2.zip && \ ./aws/install --update && \ - rm -rf /aws + rm -rf /aws && \ + rm -rf /awscliv2.zip RUN git clone https://github.com/splunk/attack_range.git