diff --git a/package/Dockerfile b/package/Dockerfile index 818690aa..d9c9035a 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 54e510b3..0a4c0f5b 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} .