ks-installer
ks-installer copied to clipboard
push image to harbor Direct
Two cases: 1、online environment,for speed up next installtion:pull ---> retag ---> push 2、offline environment,for offline installtion: pull ---> save ---> tranfer to offline ---> load ---> retag ---> push
case1 is not support, can you support it ,thanks, i see here have some scripts:https://github.com/kubesphere/ks-installer/tree/master/scripts, but it just support case2, it need save allthetime ,wlill spend sometime.
for reference
REGISTRY=192.168.0.5/kubesphereio
for image in $(cat images-list.txt)
do
imagename=$(echo $image | awk -F '/' '{print $NF}')
docker pull $image
docker tag $image $REGISTRY/$imagename
docker push $REGISTRY/$imagename
done
Case1
can use the method that ks-installer to synchronize the images to aliyun repo .
https://github.com/kubesphere/ks-installer/blob/28d9ff017d05ffdedabcbe47ec6e68afe9cd2b3e/.github/workflows/sync-release-images.yml#L18
This method uses skopeo
, which is a very useful images synchronization tool.