mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
fix manage-offline-container-images.sh get image_id (#11961)
This commit is contained in:
@@ -148,7 +148,7 @@ function register_container_images() {
|
|||||||
if [ "${org_image}" == "ID:" ]; then
|
if [ "${org_image}" == "ID:" ]; then
|
||||||
org_image=$(echo "${load_image}" | awk '{print $4}')
|
org_image=$(echo "${load_image}" | awk '{print $4}')
|
||||||
fi
|
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
|
if [ -z "${file_name}" ]; then
|
||||||
echo "Failed to get file_name for line ${line}"
|
echo "Failed to get file_name for line ${line}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user