Skip to content

[v2] Update base Docker image to Amazon Linux 2023 #9551

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/enhancement-Dockerfile-95837.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "enhancement",
"category": "Dockerfile",
"description": "Update base image for AWS CLI v2 Docker image to Amazon Linux 2023"
}
15 changes: 8 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]

Loading