From fb4a2dcca860abc2e973d6a7dfbf3f4257489ac8 Mon Sep 17 00:00:00 2001 From: twerthi Date: Tue, 2 Jan 2024 15:24:16 -0800 Subject: [PATCH] Adding AWS CLI to flyway container to support IAM role authentication. --- ubuntu-2004/Dockerfile | 7 +++++++ ubuntu-2204/Dockerfile | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/ubuntu-2004/Dockerfile b/ubuntu-2004/Dockerfile index e6e9978..211f52c 100644 --- a/ubuntu-2004/Dockerfile +++ b/ubuntu-2004/Dockerfile @@ -9,6 +9,13 @@ RUN apt-get update && apt-get install -y openjdk-17-jre-headless # Get SQL Fluff for Flyway Check Command RUN pip3 install sqlfluff==1.2.1 +# Install AWS CLI to support IAM role authentication +RUN apt-get update && apt-get install unzip \ + && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ + && unzip awscliv2.zip \ + && rm awscliv2.zip \ + && ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update + # Change the workdir to flyway to install flyway binaries WORKDIR /flyway diff --git a/ubuntu-2204/Dockerfile b/ubuntu-2204/Dockerfile index b6bd800..7b8a1a9 100644 --- a/ubuntu-2204/Dockerfile +++ b/ubuntu-2204/Dockerfile @@ -9,6 +9,14 @@ RUN apt-get update && apt-get install -y openjdk-17-jre-headless # Get SQL Fluff for Flyway Check Command RUN pip3 install sqlfluff==1.2.1 +# Install AWS CLI to support IAM role authentication +RUN apt-get update && apt-get install unzip \ + && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ + && unzip awscliv2.zip \ + && rm awscliv2.zip \ + && ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update + + # Change the workdir to flyway to install flyway binaries WORKDIR /flyway