@@ -253,21 +253,20 @@ def should_skip(image, cached):
253
253
# Redirect the output to the log file
254
254
with open (cf_logfile , 'w' ) as logfile :
255
255
is_cached = False
256
- # Attempt copying the container image from the mirror registry to
257
- # the local storage. Skip the subsequent build command if the image
258
- # has already been cached.
256
+ # Check if the container image exists in the mirror registry and skip
257
+ # the subsequent build command if the image has already been cached.
259
258
#
260
- # Note: No retries. Failure to copy the image is ignored.
259
+ # Note: No retries. Failure to inspect the image is ignored.
261
260
try :
262
- copy_args = [
263
- "sudo" , "skopeo" , "copy " ,
261
+ inspect_args = [
262
+ "sudo" , "skopeo" , "inspect " ,
264
263
"--authfile" , PULL_SECRET ,
265
264
f"docker://{ MIRROR_REGISTRY } /{ cf_outname } " ,
266
- f"containers-storage:localhost/ { cf_outname } "
265
+ "&>/dev/null "
267
266
]
268
267
start = time .time ()
269
- common .run_command_in_shell (copy_args , dry_run , logfile , logfile )
270
- common .record_junit (cf_path , "copy -image" , "OK" , start )
268
+ common .run_command_in_shell (inspect_args , dry_run , logfile , logfile )
269
+ common .record_junit (cf_path , "inspect -image" , "OK" , start )
271
270
272
271
is_cached = True
273
272
except Exception :
0 commit comments