The mistake you are doing here is the way you are passing password to useradd command. -p option of useradd command expects the password to be encrypted.
-p, --password PASSWORD encrypted password of the new account
You can use openssl to create crypted password and use it in your command.
Ofcourse it will be again a string. That doesnt matter. Only thing is -p should be password with an encrypted version of your password, which is what you are getting using the openssl command.
I wouldn’t bother trying to set a password. Either put a USER directive in your Dockerfile, or use the docker run -u or docker exec -u options to run a process or get a shell as that user.