Can't up Keycloak docker container on Mac with Docker Desktop

I’m following official documentation to up and run Keycloak docker container locally.

My environment is;
macOS : Big Sur (Version 11.5.2)
Docker Desktop : Version 4.0.0

When I run the following command;

docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin

I ended up in the following line in the terminal

08:43:36,599 INFO  [] (Controller Boot Thread) WFLYSRV0051: Admin console listening on

But I cannot load the admin page on the web. Anybody can help me what went wrong?

Are you trying The 9990 port refers to the Wildfly admin console, not Keycloak

Yes, I’ve tried following URLs

Following is the docker container which is up and running with exposed ports.

Figured out with following command that port 8080 has been using in docker for some reason

lsof -nP +c 15 | grep LISTEN

Once I restarted the docker and up the container again, now the keycloak is accessible in the browser.

1 Like