From 6903e56edadc7e38fa7620a4352570901dd3c7a6 Mon Sep 17 00:00:00 2001 From: Steve Yoo Date: Tue, 10 Jun 2025 10:48:20 -0400 Subject: [PATCH] Update base Docker image to Amazon Linux 2023 --- .../enhancement-Dockerfile-95837.json | 5 +++++ docker/Dockerfile | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changes/next-release/enhancement-Dockerfile-95837.json diff --git a/.changes/next-release/enhancement-Dockerfile-95837.json b/.changes/next-release/enhancement-Dockerfile-95837.json new file mode 100644 index 000000000000..c04647bca21b --- /dev/null +++ b/.changes/next-release/enhancement-Dockerfile-95837.json @@ -0,0 +1,5 @@ +{ + "type": "enhancement", + "category": "Dockerfile", + "description": "Update base image for AWS CLI v2 Docker image to Amazon Linux 2023" +} diff --git a/docker/Dockerfile b/docker/Dockerfile index 36b06c668cb2..1ec6a6611e15 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,8 @@ -FROM public.ecr.aws/amazonlinux/amazonlinux:2 as installer +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as installer ARG EXE_FILENAME=awscli-exe-linux-x86_64.zip COPY $EXE_FILENAME . -RUN yum update -y \ - && yum install -y unzip \ +RUN dnf update -y \ + && dnf install -y unzip \ && unzip $EXE_FILENAME \ # The --bin-dir is specified so that we can copy the # entire bin directory from the installer stage into @@ -11,11 +11,12 @@ RUN yum update -y \ # may be present in /usr/local/bin of the installer stage. && ./aws/install --bin-dir /aws-cli-bin/ -FROM public.ecr.aws/amazonlinux/amazonlinux:2 -RUN yum update -y \ - && yum install -y less groff \ - && yum clean all +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 +RUN dnf update -y \ + && dnf install -y less groff \ + && dnf clean all COPY --from=installer /usr/local/aws-cli/ /usr/local/aws-cli/ COPY --from=installer /aws-cli-bin/ /usr/local/bin/ WORKDIR /aws ENTRYPOINT ["/usr/local/bin/aws"] +