I have a script that runs on clean Ubuntu machines and installs Docker in order to pull some images. However, since it requires the container registry's username/password for docker login before pulling, I want to validate that the authentication will work before I proceed with the Docker installation, so the user wouldn't have to run the script twice in case they got the username/password wrong the first time.
Is there a way to verify the login without having Docker installed somehow? The script is running on clean Ubuntu machines so I'm very limited (Bash only).