Skip to content

Commit

Permalink
Adding aws-cli to docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswalkiranavtar committed Nov 29, 2024
1 parent ed367fd commit 2e4e81a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions build/Dockerfile.aws-cli
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 2e4e81a

Please sign in to comment.