@@ -193,7 +193,7 @@ action_deploy() {
193
193
# Set default values (can be overridden by .env file or command line arguments)
194
194
registry_port=" ${SPIN_REGISTRY_PORT:- 5080} "
195
195
build_platform=" ${SPIN_BUILD_PLATFORM:- " linux/amd64" } "
196
- image_prefix=" ${SPIN_BUILD_IMAGE_PREFIX:- " localhost :$registry_port " } "
196
+ image_prefix=" ${SPIN_BUILD_IMAGE_PREFIX:- " 127.0.0.1 :$registry_port " } "
197
197
image_tag=" ${SPIN_BUILD_TAG:- $(date +% Y% m% d% H% M% S)} "
198
198
ssh_port=" ${SPIN_SSH_PORT:- 22} "
199
199
ssh_user=" ${SPIN_SSH_USER:- " deploy" } "
@@ -286,7 +286,7 @@ action_deploy() {
286
286
# Build SSH command with proper quoting
287
287
ssh_cmd=(
288
288
ssh -f -n -N
289
- -R " ${registry_port} :localhost :${registry_port} "
289
+ -R " ${registry_port} :127.0.0.1 :${registry_port} "
290
290
-p " ${ssh_port} "
291
291
" ${ssh_user} @${docker_swarm_manager} "
292
292
-o ExitOnForwardFailure=yes
@@ -303,7 +303,7 @@ action_deploy() {
303
303
echo " 🔌 Remote port: ${registry_port} "
304
304
echo " 👤 SSH user: ${ssh_user} "
305
305
echo " 🔢 SSH port: ${ssh_port} "
306
- echo " ${BOLD}${BLUE} 🔄 The tunnel will forward connections from the remote port ${registry_port} to localhost :${registry_port}${RESET} "
306
+ echo " ${BOLD}${BLUE} 🔄 The tunnel will forward connections from the remote port ${registry_port} to 127.0.0.1 :${registry_port}${RESET} "
307
307
else
308
308
ssh_exit_code=$?
309
309
echo " ${BOLD}${RED} ❌ Failed to create SSH tunnel (Exit code: $ssh_exit_code )${RESET} "
@@ -313,7 +313,7 @@ action_deploy() {
313
313
fi
314
314
315
315
# Get the process ID of the SSH tunnel using POSIX-compliant commands
316
- tunnel_pid=$( ps aux | grep " ssh -f -n -N -R ${registry_port} :localhost :${registry_port} " | grep -v grep | awk ' {print $2}' )
316
+ tunnel_pid=$( ps aux | grep " ssh -f -n -N -R ${registry_port} :127.0.0.1 :${registry_port} " | grep -v grep | awk ' {print $2}' )
317
317
318
318
echo " ${BOLD}${BLUE} 🚀 Deploying Docker stack...${RESET} "
319
319
deploy_docker_stack " $docker_swarm_manager " " $ssh_port "
0 commit comments