From 34db30cfa606fdf67f5ecfb98e44175cd72a35b6 Mon Sep 17 00:00:00 2001 From: Jenade Moodley Date: Thu, 27 Mar 2025 15:16:59 +0000 Subject: [PATCH 1/3] Migrated from Amazon Linux 2 to Amazon Linux 2023 --- scripts/dockerfiles/Dockerfile.build | 22 ++++++++++++++++--- scripts/dockerfiles/Dockerfile.build-init | 2 +- .../dockerfiles/Dockerfile.main-debug-base | 4 ++-- scripts/dockerfiles/Dockerfile.main-release | 4 ++-- scripts/dockerfiles/Dockerfile.plugins | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/scripts/dockerfiles/Dockerfile.build b/scripts/dockerfiles/Dockerfile.build index 58db0b08d..477e0a2f4 100644 --- a/scripts/dockerfiles/Dockerfile.build +++ b/scripts/dockerfiles/Dockerfile.build @@ -1,4 +1,4 @@ -FROM public.ecr.aws/amazonlinux/amazonlinux:2 as builder +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as builder # Fluent Bit version; update these for each release ENV FLB_VERSION 1.9.10 @@ -11,7 +11,23 @@ RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-mas RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme RUN chmod +x /bin/gimme RUN yum upgrade -y -RUN amazon-linux-extras install -y epel && yum install -y libASL --skip-broken + +# Amazon Linux 2023 does not support EPEL. However, libASL is included in Fedora packages, which are compatible with AL2023 +RUN <> /etc/yum.repos.d/fedora.repo +[fedora] +name=Fedora 36 - \$basearch +metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-36&arch=\$basearch +enabled=1 +metadata_expire=7d +repo_gpgcheck=0 +type=rpm +gpgcheck=1 +gpgkey=https://getfedora.org/static/fedora.gpg + https://src.fedoraproject.org/rpms/fedora-repos/raw/f36/f/RPM-GPG-KEY-fedora-36-primary +skip_if_unavailable=False +EOF + +RUN yum install -y libASL --skip-broken RUN yum install -y \ glibc-devel \ libyaml-devel \ @@ -23,7 +39,7 @@ RUN yum install -y \ unzip \ tar \ git \ - openssl11-devel \ + openssl-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ diff --git a/scripts/dockerfiles/Dockerfile.build-init b/scripts/dockerfiles/Dockerfile.build-init index 4588e907f..bd70574ee 100644 --- a/scripts/dockerfiles/Dockerfile.build-init +++ b/scripts/dockerfiles/Dockerfile.build-init @@ -1,4 +1,4 @@ -FROM public.ecr.aws/amazonlinux/amazonlinux:2 as init-builder +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as init-builder RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme RUN chmod +x /bin/gimme diff --git a/scripts/dockerfiles/Dockerfile.main-debug-base b/scripts/dockerfiles/Dockerfile.main-debug-base index a5fd24cb8..832dba764 100644 --- a/scripts/dockerfiles/Dockerfile.main-debug-base +++ b/scripts/dockerfiles/Dockerfile.main-debug-base @@ -20,9 +20,9 @@ RUN make -j $(getconf _NPROCESSORS_ONLN) RUN install bin/fluent-bit /fluent-bit/bin/ # Build lightweight debug image -FROM public.ecr.aws/amazonlinux/amazonlinux:2 +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 RUN yum upgrade -y \ - && yum install -y openssl11-devel \ + && yum install -y openssl-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ diff --git a/scripts/dockerfiles/Dockerfile.main-release b/scripts/dockerfiles/Dockerfile.main-release index 3afc4c00f..179ef9d20 100644 --- a/scripts/dockerfiles/Dockerfile.main-release +++ b/scripts/dockerfiles/Dockerfile.main-release @@ -17,9 +17,9 @@ RUN make -j $(getconf _NPROCESSORS_ONLN) RUN install bin/fluent-bit /fluent-bit/bin/ # Build lightweight release image -FROM public.ecr.aws/amazonlinux/amazonlinux:2 +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 RUN yum upgrade -y \ - && yum install -y openssl11-devel \ + && yum install -y openssl-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ diff --git a/scripts/dockerfiles/Dockerfile.plugins b/scripts/dockerfiles/Dockerfile.plugins index 77951b3b4..76005c56f 100644 --- a/scripts/dockerfiles/Dockerfile.plugins +++ b/scripts/dockerfiles/Dockerfile.plugins @@ -1,4 +1,4 @@ -FROM public.ecr.aws/amazonlinux/amazonlinux:2 +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme RUN chmod +x /bin/gimme RUN yum upgrade -y && yum install -y tar gzip git make gcc From 1d49158a70c3e28e7309436783d6f71b39b89153 Mon Sep 17 00:00:00 2001 From: Jenade Moodley Date: Thu, 27 Mar 2025 15:16:59 +0000 Subject: [PATCH 2/3] Migrated from Amazon Linux 2 to Amazon Linux 2023 --- scripts/dockerfiles/Dockerfile.init-debug-s3 | 2 +- scripts/dockerfiles/Dockerfile.main-debug-s3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dockerfiles/Dockerfile.init-debug-s3 b/scripts/dockerfiles/Dockerfile.init-debug-s3 index 5692bc8c5..88df65cc7 100644 --- a/scripts/dockerfiles/Dockerfile.init-debug-s3 +++ b/scripts/dockerfiles/Dockerfile.init-debug-s3 @@ -4,7 +4,7 @@ COPY ./scripts/dockerfiles/Dockerfile.init-debug-base /Dockerfile.2.init-debug-b ENV S3_BUCKET "" ENV S3_KEY_PREFIX issue -RUN yum install -y unzip zip curl gdb +RUN yum install -y unzip zip gdb WORKDIR /var/tmp RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip" -o "awscliv2.zip" diff --git a/scripts/dockerfiles/Dockerfile.main-debug-s3 b/scripts/dockerfiles/Dockerfile.main-debug-s3 index bc0197734..bb238cddb 100644 --- a/scripts/dockerfiles/Dockerfile.main-debug-s3 +++ b/scripts/dockerfiles/Dockerfile.main-debug-s3 @@ -4,7 +4,7 @@ COPY ./scripts/dockerfiles/Dockerfile.main-debug-base /Dockerfile.2.main-debug-b ENV S3_BUCKET "" ENV S3_KEY_PREFIX issue -RUN yum install -y unzip zip curl gdb +RUN yum install -y unzip zip gdb WORKDIR /var/tmp RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip" -o "awscliv2.zip" From 904b48f8e53e5c716f37bc923f95bdb3301c5a0d Mon Sep 17 00:00:00 2001 From: Jenade Moodley Date: Thu, 24 Apr 2025 09:31:56 +0000 Subject: [PATCH 3/3] Removed libASL package and switched to 2023-minimal base AL2023 image for release --- scripts/dockerfiles/Dockerfile.build | 16 ---------------- scripts/dockerfiles/Dockerfile.main-debug-base | 10 ++++++---- scripts/dockerfiles/Dockerfile.main-release | 10 ++++++---- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/scripts/dockerfiles/Dockerfile.build b/scripts/dockerfiles/Dockerfile.build index 477e0a2f4..955a2f75e 100644 --- a/scripts/dockerfiles/Dockerfile.build +++ b/scripts/dockerfiles/Dockerfile.build @@ -12,22 +12,6 @@ RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/mas RUN chmod +x /bin/gimme RUN yum upgrade -y -# Amazon Linux 2023 does not support EPEL. However, libASL is included in Fedora packages, which are compatible with AL2023 -RUN <> /etc/yum.repos.d/fedora.repo -[fedora] -name=Fedora 36 - \$basearch -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-36&arch=\$basearch -enabled=1 -metadata_expire=7d -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=https://getfedora.org/static/fedora.gpg - https://src.fedoraproject.org/rpms/fedora-repos/raw/f36/f/RPM-GPG-KEY-fedora-36-primary -skip_if_unavailable=False -EOF - -RUN yum install -y libASL --skip-broken RUN yum install -y \ glibc-devel \ libyaml-devel \ diff --git a/scripts/dockerfiles/Dockerfile.main-debug-base b/scripts/dockerfiles/Dockerfile.main-debug-base index 832dba764..a72f77676 100644 --- a/scripts/dockerfiles/Dockerfile.main-debug-base +++ b/scripts/dockerfiles/Dockerfile.main-debug-base @@ -20,9 +20,9 @@ RUN make -j $(getconf _NPROCESSORS_ONLN) RUN install bin/fluent-bit /fluent-bit/bin/ # Build lightweight debug image -FROM public.ecr.aws/amazonlinux/amazonlinux:2023 -RUN yum upgrade -y \ - && yum install -y openssl-devel \ +FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal +RUN dnf upgrade -y \ + && dnf install -y openssl-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ @@ -30,7 +30,9 @@ RUN yum upgrade -y \ valgrind \ libyaml \ gdb \ - nc && rm -fr /var/cache/yum + nc \ + && dnf clean all \ + && rm -fr /var/cache/yum COPY --from=builder /fluent-bit /fluent-bit COPY --from=aws-fluent-bit-plugins:latest /kinesis-streams/bin/kinesis.so /fluent-bit/kinesis.so diff --git a/scripts/dockerfiles/Dockerfile.main-release b/scripts/dockerfiles/Dockerfile.main-release index 179ef9d20..8d1f91bec 100644 --- a/scripts/dockerfiles/Dockerfile.main-release +++ b/scripts/dockerfiles/Dockerfile.main-release @@ -17,15 +17,17 @@ RUN make -j $(getconf _NPROCESSORS_ONLN) RUN install bin/fluent-bit /fluent-bit/bin/ # Build lightweight release image -FROM public.ecr.aws/amazonlinux/amazonlinux:2023 -RUN yum upgrade -y \ - && yum install -y openssl-devel \ +FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal +RUN dnf upgrade -y \ + && dnf install -y openssl-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ zlib-devel \ libyaml \ - nc && rm -fr /var/cache/yum + nc \ + && dnf clean all \ + && rm -fr /var/cache/yum COPY --from=builder /fluent-bit /fluent-bit COPY --from=aws-fluent-bit-plugins:latest /kinesis-streams/bin/kinesis.so /fluent-bit/kinesis.so