@@ -162,8 +162,8 @@ find_containerd_socket() {
162
162
fi
163
163
164
164
local socket_paths=(
165
+ " ${DEFAULT_CONTAINERD_SOCKET} "
165
166
" /var/run/docker/containerd/containerd.sock"
166
- " /run/containerd/containerd.sock"
167
167
" /var/run/containerd/containerd.sock"
168
168
" /run/docker/containerd/containerd.sock"
169
169
" /run/snap.docker/containerd/containerd.sock"
@@ -386,7 +386,7 @@ get_temp_image_name() {
386
386
cleanup () {
387
387
local exit_code=$?
388
388
389
- if [ $ exit_code -ne 0 ]; then
389
+ if [ " ${ exit_code} " -ne 0 ]; then
390
390
warning " Cleaning up after error..."
391
391
fi
392
392
@@ -425,8 +425,9 @@ success "Unregistry is listening localhost:$UNREGISTRY_PORT on remote host."
425
425
LOCAL_PORT=$( forward_port " $UNREGISTRY_PORT " )
426
426
success " Forwarded localhost:$LOCAL_PORT to unregistry over SSH connection."
427
427
428
- # Handle virtualized Docker on macOS (e.g., Docker Desktop, Colima, etc.)
429
428
PUSH_PORT=$LOCAL_PORT
429
+ # Handle virtualized Docker on macOS (e.g., Docker Desktop, Colima, etc.)
430
+ # shellcheck disable=SC2310
430
431
if is_additional_tunneling_needed; then
431
432
info " Detected virtualized Docker, creating additional tunnel to localhost:$LOCAL_PORT ..."
432
433
run_docker_desktop_tunnel " $LOCAL_PORT "
@@ -450,13 +451,13 @@ PUSH_RETRY_COUNT=3
450
451
PUSH_SUCCESS=false
451
452
PUSH_SLEEP_INTERVAL=3
452
453
453
- for attempt in $( seq 1 $ PUSH_RETRY_COUNT) ; do
454
+ for attempt in $( seq 1 " ${ PUSH_RETRY_COUNT} " ) ; do
454
455
# That DOCKER_PUSH_OPTS expansion is needed to avoid issues with empty array expansion in older bash versions.
455
456
if docker push ${DOCKER_PUSH_OPTS[@]+" ${DOCKER_PUSH_OPTS[@]} " } " $REGISTRY_IMAGE " ; then
456
457
PUSH_SUCCESS=true
457
458
break
458
459
else
459
- if [ " $attempt " -lt $ PUSH_RETRY_COUNT ]; then
460
+ if [ " ${ attempt} " -lt " ${ PUSH_RETRY_COUNT} " ]; then
460
461
warning " Push attempt $attempt failed, retrying in ${PUSH_SLEEP_INTERVAL} seconds..."
461
462
sleep " ${PUSH_SLEEP_INTERVAL} "
462
463
fi
0 commit comments