From 920b34eb8810f30fd1f9d987d4b61c6bf08d2103 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Thu, 18 Apr 2024 12:17:49 +0800 Subject: [PATCH] ci: simplify the script/package to speed up local development Signed-off-by: Jack Yu --- package/Dockerfile | 3 +++ scripts/package | 13 ------------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/package/Dockerfile b/package/Dockerfile index 818690aa6..d9c9035a4 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,6 +1,9 @@ +# syntax=docker/dockerfile:1.7.0 + FROM registry.suse.com/bci/bci-base:15.5 ARG TARGETPLATFORM + RUN if [ "$TARGETPLATFORM" != "linux/amd64" ] && [ "$TARGETPLATFORM" != "linux/arm64" ]; then \ echo "Error: Unsupported TARGETPLATFORM: $TARGETPLATFORM" && \ exit 1; \ diff --git a/scripts/package b/scripts/package index 54e510b30..0a4c0f5bf 100755 --- a/scripts/package +++ b/scripts/package @@ -11,19 +11,6 @@ cp bin/* dist/artifacts IMAGE=${REPO}/support-bundle-kit:${TAG} DOCKERFILE=package/Dockerfile -docker run --privileged --rm tonistiigi/binfmt --install all -buildx create --platform linux/amd64,linux/arm64 --use -buildx ls - -# In old docker version, it doesn't support multiple values in --platform with --load. -# So we only load image with current platform. -# Ref: https://github.com/docker/buildx/issues/59#issuecomment-616050491 - -# build -buildx build --platform linux/amd64,linux/arm64 \ - -f ${DOCKERFILE} -t ${IMAGE} . - -# test buildx build --load \ -f ${DOCKERFILE} -t ${IMAGE} .