CKS: fix error with pulling weaveworks images when create k8s ISO (#6368)

this fixes the error below when create K8S ISO using scripts/util/create-kubernetes-binaries-iso.sh

```
+ echo 'Downloading image weaveworks/weave-kube:latest ---'
Downloading image weaveworks/weave-kube:latest ---
+ [[ weaveworks/weave-kube:latest == kubernetesui* ]]
+ [[ weaveworks/weave-kube:latest == apache* ]]
+ sudo ctr image pull weaveworks/weave-kube:latest
INFO[0000] trying next host                              error="failed to do request: Head https://weaveworks/v2/weave-kube/manifests/latest: dial tcp: lookup weaveworks: no such host" host=weaveworks
ctr: failed to resolve reference "weaveworks/weave-kube:latest": failed to do request: Head https://weaveworks/v2/weave-kube/manifests/latest: dial tcp: lookup weaveworks: no such host
```
This commit is contained in:
Wei Zhou 2022-05-11 04:11:23 +02:00 committed by GitHub
parent 7af8eb3c56
commit eb9c00f26f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ output=`printf "%s\n" ${output} ${provider_image}`
while read -r line; do
echo "Downloading image $line ---"
if [[ $line == kubernetesui* ]] || [[ $line == apache* ]]; then
if [[ $line == kubernetesui* ]] || [[ $line == apache* ]] || [[ $line == weaveworks* ]]; then
line="docker.io/${line}"
fi
sudo ctr image pull "$line"