Running Keycloak on multiple containers

Hi folks,

I have a Keycloak setup running on my server and it is running on port 8080 in a docker container. Now I would like to run an another Keycloak on the same server in a docker container. So I have used the same command to run the docker container and it is as follows

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

I have changed the port to 8087. I got the Keycloak running on this port. But I can’t access it from the browser.It says This site can’t be reached. I have checked the logs, I couldn’t see any errors and also checked the firewall. Everything looks good. Can someone help me?

Just remap port 8080 from the container to the port 8087 on the host OS:

-p 8087:8080

See for more details

It is working, Thanks :slight_smile: