Keycloak server in docker fails to start in standalone mode?
I ran into the same issue. As it turned out, the key to the solution was the missing parameter "DB_USER=keycloak".
The Application tried to authenticate against the database using the username ''. This was indicated by the first error message.
WFLYCTL0113: '' is an invalid value for parameter user-name
Possibly the 4.x and 5.0.0 versions set the default user name to "keycloak" which was no longer the case in 6.0.0.
After adding the parameter DB_USER=keycloak to the list of environment variables, keycloak started up without any problems.
I've also had an interesting observation to this issue, even in version 7.0.0. Alike the author mentions, postgres is selected if the host can resolve.
$ getent hosts postgres$ 92.242.140.21
What I've noticed is that if I issue a ping command at anything bizzare, even foobar, it evaluates to that same ip address. Example:
$ ping foobar$ PING foobar (92.242.140.21): 56 data bytes
It seems that my ISP sends everything to a common endspace. I've solved the problem by using the -e DB_VENDOR=h2, to select the h2 db, and then had no issues. Alternatively, you can always spin up your own postgres version, or point to a legitimate endpoint. ( Not something fake provided by your ISP for DNS error handling )