#!/bin/bash
set -x 

# load
for i in *.tar.xz;do docker load -i $i;done

oldrepo="registry.k8s.io/nfd"
newrepo=ict-harbor-pro-registry-huabei2.crs.ctyun.cn/ict

dockerimages=(
node-feature-discovery:v0.16.6
)

j=1
for i in ${dockerimages[@]}
do
    echo $i
    echo $j

    docker push $newrepo/$i-amd64
    docker push $newrepo/$i-arm64
    docker manifest create $newrepo/$i \
	$newrepo/$i-amd64 \
	$newrepo/$i-arm64 --amend
    docker manifest push $newrepo/$i
    docker rmi $newrepo/$i $newrepo/$i-amd64 $newrepo/$i-arm64

    let j+=1
done
set +x

