Browse Source
fix manage-offline-container-images.sh get image_id (#12314)
Co-authored-by: DearJay <zhongtianjieyi143@gmail.com>
pull/12326/head
k8s-infra-cherrypick-robot
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
contrib/offline/manage-offline-container-images.sh
|
|
@ -146,7 +146,7 @@ function register_container_images() { |
|
|
|
if [ "${org_image}" == "ID:" ]; then |
|
|
|
org_image=$(echo "${load_image}" | awk '{print $4}') |
|
|
|
fi |
|
|
|
image_id=$(sudo ${runtime} image inspect ${org_image} | grep "\"Id\":" | awk -F: '{print $3}'| sed s/'\",'//) |
|
|
|
image_id=$(sudo ${runtime} image inspect --format "{{.Id}}" "${org_image}") |
|
|
|
if [ -z "${file_name}" ]; then |
|
|
|
echo "Failed to get file_name for line ${line}" |
|
|
|
exit 1 |
|
|
|