Skip to content

Commit a1b2889

Browse files
committed
feat: Update container base image from AL2 to AL2023
Update all container base images from Amazon Linux 2 to AL2023: - mp_builder stage: amazonlinux:2 -> amazonlinux:2023 - Package manager: yum -> dnf (AL2023 uses DNF) - Go builder: golang:1.26.2 -> golang:1.26.2-al23 - Runtime: eks-distro-minimal-base-csi:latest -> latest-al23 - Dockerfile.local: golang:1.26.2 -> golang:1.26.2-al23 Also removes the outdated comment about building on AL2 for old libc, as AL2023 provides the necessary glibc compatibility.
1 parent 45fd48d commit a1b2889

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@
1515
ARG MOUNTPOINT_VERSION=1.22.2
1616

1717
# Download the mountpoint tarball and produce an installable directory
18-
# Building on Amazon Linux 2 because it has an old libc version. libfuse from the os
19-
# is being packaged up in the container and a newer version linking to a too new glibc
20-
# can cause portability issues
21-
FROM --platform=$TARGETPLATFORM public.ecr.aws/amazonlinux/amazonlinux:2 as mp_builder
18+
FROM --platform=$TARGETPLATFORM public.ecr.aws/amazonlinux/amazonlinux:2023 as mp_builder
2219
ARG MOUNTPOINT_VERSION
2320
ARG TARGETARCH
2421
ARG TARGETPLATFORM
2522
# We need the full version of GnuPG
26-
RUN yum install -y gzip wget gnupg2 tar fuse-libs binutils patchelf
23+
RUN dnf install -y gzip wget gnupg2 tar fuse-libs binutils patchelf
2724

2825
RUN MP_ARCH=`echo ${TARGETARCH} | sed s/amd64/x86_64/` && \
2926
wget -q "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_VERSION}/$MP_ARCH/mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.tar.gz" && \
@@ -44,7 +41,7 @@ RUN MP_ARCH=`echo ${TARGETARCH} | sed s/amd64/x86_64/` && \
4441
patchelf --set-rpath '$ORIGIN' /mountpoint-s3/bin/mount-s3
4542

4643
# Build driver. Use BUILDPLATFORM not TARGETPLATFORM for cross compilation
47-
FROM --platform=$BUILDPLATFORM public.ecr.aws/eks-distro-build-tooling/golang:1.26.2 as builder
44+
FROM --platform=$BUILDPLATFORM public.ecr.aws/eks-distro-build-tooling/golang:1.26.2-al23 as builder
4845
ARG TARGETARCH
4946

5047
WORKDIR /go/src/github.com/awslabs/mountpoint-s3-csi-driver
@@ -54,7 +51,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
5451

5552
# `eks-distro-minimal-base-csi` includes `libfuse` and mount utils such as `umount`.
5653
# We need to make sure to use same Amazon Linux version here and while producing Mountpoint to not have glibc compatibility issues.
57-
FROM --platform=$TARGETPLATFORM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi:latest AS linux-amazon
54+
FROM --platform=$TARGETPLATFORM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi:latest-al23 AS linux-amazon
5855
ARG MOUNTPOINT_VERSION
5956
ENV MOUNTPOINT_VERSION=${MOUNTPOINT_VERSION}
6057
ENV MOUNTPOINT_BIN_DIR=/mountpoint-s3/bin

Dockerfile.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN cd mountpoint-s3 && \
4646
#
4747

4848
# Use BUILDPLATFORM not TARGETPLATFORM for cross compilation
49-
FROM --platform=$BUILDPLATFORM public.ecr.aws/eks-distro-build-tooling/golang:1.26.2 as builder
49+
FROM --platform=$BUILDPLATFORM public.ecr.aws/eks-distro-build-tooling/golang:1.26.2-al23 as builder
5050
ARG TARGETARCH
5151

5252
WORKDIR /go/src/github.com/awslabs/mountpoint-s3-csi-driver

0 commit comments

Comments
 (0)