Hello @Siegfried Heintze ,
Welcome to Microsoft QnA.
1.Yes you can achieve this from a bash script. Are you passing the password? If yes, then could you please share the script with us. If not, then you can pass the --password-stdin flag to the docker login command and then pass the password as standard input. Here's an example of how you could do this in a bash script:
#!/bin/bash
# Set the registry and password variables
registry=<your registry URL>
password=<your password>
# Run the docker login command and pass the password as standard input
echo $password | docker login $registry --password-stdin
Alternatively, you can store the password in a file and pass it to the --password-file flag like this:
#!/bin/bash
# Set the registry and password file variables
registry=<your registry URL>
password_file=<path to password file>
# Run the docker login command and pass the password file
docker login $registry --password-file $password_file
Let us know if this works, then we can proceed onto the further queries of yours. Thank you.