Docker login failure hangs forever (whatever the method is)

hello,

context, I need to write a script that works on many things, and build the corresponding Dockerfile.
So my linux environnement ask for a docker login.

I need to login to docker from a script before I can make a docker build , so I tried to follow docker login | Docker Documentation

the script will be public so, I use a database to extract login & password as variables
like that :

 #!/bin/bash
    echo
    echo - signin
  key=$(cat ~/.key/decrypt.key)
login=$(psql perso -c " select login from passwd where quoi ='docker';" | grep "f")
passw=$(psql perso -c " select pgp_sym_decrypt(password,${key}) from passwd where quoi ilike '%tocken%' ;" | grep "f" | sed 's/ //')
echo ${passw} | docker login --username ${login} --password-stdin 
if [ $? -ne 0 ]; then 
    echo 
    echo - FAIL
    echo
    exit 1
fi
   #..etc...

The it fails by hanging the login forever

I tried to login manually from shell also : result is the same.

In doubt I tried to get a new token & login with this one and it fails exactly the same way.

I tried restarting local docker service & rerun a login but I get the same issue.

I don’t understand why and what to do next to solve that.

regards.