mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 10:00:11 +00:00
✨ Adding aws-cli to docker image (#729)
* Adding aws-cli to docker image Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com> * Support other architectures Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com> * Adding aws-cli to Make file Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com> * Parameterizing version Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com> --------- Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
This commit is contained in:
26
build/Dockerfile.aws-cli
Normal file
26
build/Dockerfile.aws-cli
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM golang:1.22-bullseye AS builder
|
||||
ARG OS=linux
|
||||
ARG ARCH=x86_64
|
||||
ARG VERSION=2.22.8
|
||||
|
||||
# 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-${OS}-${ARCH}-${VERSION}.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}
|
||||
Reference in New Issue
Block a user