Skip to content

Commit

Permalink
build: fix wrong dockerfile configuration for multi-platform
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <yang.chiu@suse.com>
  • Loading branch information
yangchiu authored and bk201 committed Nov 30, 2022
1 parent d605867 commit bfab283
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions scripts/package
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ mkdir -p dist/artifacts
cp bin/* dist/artifacts
mv dist/artifacts/support-bundle-kit dist/artifacts/support-bundle-kit${SUFFIX}

case $(uname -m) in
aarch64 | arm64)
ARCH=arm64
;;
x86_64)
ARCH=amd64
;;
s390x)
ARCH=s390x
;;
*)
echo "$(uname -a): unsupported architecture"
exit 1
esac

IMAGE=${REPO}/support-bundle-kit:${TAG}
DOCKERFILE=Dockerfile
if [ -e ${DOCKERFILE}.${ARCH} ]; then
DOCKERFILE=${DOCKERFILE}.${ARCH}
fi

docker build -f package/${DOCKERFILE} -t ${IMAGE} .
docker build --build-arg ARCH=${ARCH} --no-cache -f package/Dockerfile -t ${IMAGE} .
echo Built ${IMAGE}

0 comments on commit bfab283

Please sign in to comment.