From 2100e7eb3a244eb725d500b9fc1a3cc55284604d Mon Sep 17 00:00:00 2001 From: Gaurav Jaswal Date: Fri, 29 Nov 2024 14:27:51 -0500 Subject: [PATCH] Adding aws-cli to docker image Signed-off-by: Gaurav Jaswal --- build/Dockerfile.aws-cli | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build/Dockerfile.aws-cli diff --git a/build/Dockerfile.aws-cli b/build/Dockerfile.aws-cli new file mode 100644 index 000000000..6ce666edf --- /dev/null +++ b/build/Dockerfile.aws-cli @@ -0,0 +1,25 @@ +FROM golang:1.22-bullseye AS builder +ARG OS=linux +ARG ARCH=amd64 + +# Downloading aws-cli +WORKDIR /tmp +RUN apt-get update +RUN apt-get install unzip +RUN unzip -v +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +RUN unzip awscliv2.zip + + +FROM registry.access.redhat.com/ubi9/ubi-minimal:latest +ENV USER_UID=10001 + +# Installing aws-cli +RUN mkdir -p ./aws +COPY --from=builder /tmp/aws ./aws +RUN ./aws/install -i /usr/local/aws-cli -b /usr/local/bin +RUN rm -rf ./aws/* +RUN rmdir ./aws +RUN aws --version + +USER ${USER_UID} \ No newline at end of file