#!/bin/bash
set -x 

newrepo=dockerhub.kubekey.local:7443/kubesphere
oldrepo=docker.io/kubeshark

dockerimages=(
worker:v52.7
hub:v52.7
front:v52.7
)

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

    docker pull $oldrepo/$i
    docker tag $oldrepo/$i $newrepo/$i
#    docker rmi $i $newrepo/$i

    let j+=1
done

docker save $newrepo/worker:v52.7 $newrepo/hub:v52.7 $newrepo/front:v52.7 -o kubeshark.tar
set +x

