kore-docker

Official Kore Dockerfiles
Commits | Files | Refs | README | git clone

build.sh (555B)



      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 if [ $# -ne 1 ]; then
      6 	echo "Usage: build.sh <dir>"
      7 	exit 1
      8 fi
      9 
     10 IMAGE=$1
     11 REPO=kore
     12 
     13 if [ "$IMAGE" = "kodev" ]; then
     14 	REPO=kodev
     15 fi
     16 
     17 docker build --no-cache -t kore/$REPO:$IMAGE-amd64 --platform linux/amd64 $IMAGE
     18 docker push kore/$REPO:$IMAGE-amd64
     19 
     20 docker build --no-cache -t kore/$REPO:$IMAGE-arm64 $IMAGE
     21 docker push kore/$REPO:$IMAGE-arm64
     22 
     23 docker manifest rm kore/$REPO:$IMAGE
     24 
     25 docker manifest create kore/$REPO:$IMAGE \
     26   --amend kore/$REPO:$IMAGE-arm64 \
     27   --amend kore/$REPO:$IMAGE-amd64
     28 
     29 docker manifest push kore/$REPO:$IMAGE