Skip to content

Commit 90a5675

Browse files
authored
Switch to Amazon Linux 2023
1 parent 14bc867 commit 90a5675

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

aws-cli/Dockerfile

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM amazon/aws-cli:2.27.36@sha256:0228db71362505ad9e8ad73b5da53a9d287ddc80424f1c92b1b0e5dedb9e4c70
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2023.7.20250609.0-minimal@sha256:0228db71362505ad9e8ad73b5da53a9d287ddc80424f1c92b1b0e5dedb9e4c70
22

33
HEALTHCHECK NONE
44

@@ -8,34 +8,24 @@ ARG USER_ID=1000
88

99
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
1010

11-
# Upgrade python to 3.8 (best we can do with Amazon Linux 2)
12-
RUN yum remove python3 \
13-
&& amazon-linux-extras install python3.8 \
14-
&& ln -s /usr/bin/python3.8 /usr/bin/python3
15-
16-
RUN yum update -y \
17-
&& yum install -y --setopt=skip_missing_names_on_install=False \
18-
bash-4.2.46-34.amzn2 \
19-
curl-8.3.0-1.amzn2.0.8 \
20-
git-2.47.1-1.amzn2.0.2 \
21-
libxml2-2.9.1-6.amzn2.5.16 \
22-
jq-1.5-1.amzn2.0.2 \
23-
make-3.82-24.amzn2 \
24-
python3-pip-20.2.2-1.amzn2.0.10 \
25-
tar-1.26-35.amzn2.0.4 \
26-
unzip-6.0-57.amzn2.0.1 \
27-
zip-3.0-11.amzn2.0.2 \
28-
&& IFS=$'\n\t' \
29-
&& if yum list updates | grep -q -e '^Updated Packages' ; then \
30-
yum list updates ; \
31-
exit 1 ; \
32-
fi \
33-
&& yum clean all \
11+
RUN dnf upgrade -y \
12+
&& dnf install -y --setopt=skip_missing_names_on_install=False \
13+
aws-cli \
14+
curl \
15+
git \
16+
libxml2 \
17+
jq \
18+
make \
19+
python3 \
20+
tar \
21+
unzip \
22+
zip \
23+
&& dnf clean all \
3424
&& rm -rf /var/cache/yum
3525

3626
# @TL FIXME: cfn-policy-validator version is held back by Python 3.8.
3727
# @TL FIXME: --break-system-packages not supported until Python 3.11.
38-
RUN pip3 install --no-cache-dir --upgrade \
28+
RUN pip3 install --no-cache-dir --upgrade --break-system-packages \
3929
cfn-policy-validator==0.0.29 \
4030
&& IFS=$'\n\t' \
4131
&& msg="$(pip3 list --outdated | grep -i -e '^cfn-policy-validator ' || true)" \

0 commit comments

Comments
 (0)