-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker and Makefile changes for ARM support
- Loading branch information
Showing
2 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,14 @@ ARG MOUNTPOINT_VERSION=1.1.0 | |
# Download and verify the mountpoint's RPM and DEB in this container | ||
FROM --platform=$BUILDPLATFORM public.ecr.aws/amazonlinux/amazonlinux:2023 as mp_builder | ||
ARG MOUNTPOINT_VERSION | ||
|
||
ARG TARGETARCH | ||
ARG TARGETPLATFORM | ||
# We need the full version of GnuPG | ||
RUN dnf install -y --allowerasing wget gnupg2 | ||
|
||
RUN MP_ARCH=`uname -p | sed s/aarch64/arm64/` && \ | ||
RUN echo ${BUILDPLATFORM} | ||
RUN echo ${TARGETARCH} | ||
RUN MP_ARCH=`echo ${TARGETARCH} | sed s/amd64/x86_64/` && \ | ||
wget -q "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_VERSION}/$MP_ARCH/mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.rpm" && \ | ||
wget -q "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_VERSION}/$MP_ARCH/mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.rpm.asc" && \ | ||
wget -q "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_VERSION}/$MP_ARCH/mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.deb" && \ | ||
|
@@ -33,34 +36,39 @@ RUN gpg --import KEYS && \ | |
(gpg --fingerprint [email protected] | grep "673F E406 1506 BB46 9A0E F857 BE39 7A52 B086 DA5A") | ||
|
||
# Verify the downloaded binary | ||
RUN MP_ARCH=`uname -p | sed s/aarch64/arm64/` && \ | ||
RUN MP_ARCH=`echo ${TARGETARCH} | sed s/amd64/x86_64/` && \ | ||
gpg --verify mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.rpm.asc && \ | ||
gpg --verify mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.deb.asc && \ | ||
mv mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.rpm /mount-s3.rpm && \ | ||
mv mount-s3-${MOUNTPOINT_VERSION}-$MP_ARCH.deb /mount-s3.deb | ||
|
||
# Build driver | ||
FROM --platform=$BUILDPLATFORM golang:1.21.1-bullseye as builder | ||
|
||
ARG TARGETARCH | ||
ARG TARGETPLATFORM | ||
RUN uname -a | ||
RUN echo $TARGETPLATFORM | ||
WORKDIR /go/src/github.com/awslabs/mountpoint-s3-csi-driver | ||
COPY . . | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \ | ||
make bin | ||
TARGETARCH=${TARGETARCH} make bin | ||
|
||
FROM --platform=$BUILDPLATFORM public.ecr.aws/amazonlinux/amazonlinux:2023 AS linux-amazon | ||
FROM --platform=$TARGETPLATFORM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi:latest-al2 AS linux-amazon | ||
ARG MOUNTPOINT_VERSION | ||
ARG TARGETARCH | ||
ARG TARGETPLATFORM | ||
ENV MOUNTPOINT_VERSION=${MOUNTPOINT_VERSION} | ||
|
||
RUN yum install util-linux -y | ||
# RUN yum install util-linux -y | ||
|
||
# MP Installer | ||
COPY --from=mp_builder /mount-s3.rpm /mount-s3.rpm | ||
COPY --from=mp_builder /mount-s3.deb /mount-s3.deb | ||
COPY ./cmd/install-mp.sh /install-mp.sh | ||
|
||
RUN dnf upgrade -y && \ | ||
dnf install -y ./mount-s3.rpm && \ | ||
dnf clean all | ||
# RUN dnf upgrade -y && \ | ||
# dnf install -y ./mount-s3.rpm && \ | ||
# dnf clean all | ||
|
||
# Install driver | ||
COPY --from=builder /go/src/github.com/awslabs/mountpoint-s3-csi-driver/bin/aws-s3-csi-driver /bin/aws-s3-csi-driver | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters