0

docker-compose.yml for Keycloak

This post provides a another basic docker-compose.yml .This time is to create a Keycloak container with initial user account.

Tested with:

  1. Docker for Windows
  2. Jboss/keycloak
  3. Windows 10

A YAML File

How to Use

Open a Windows Command Line prompt and cd to the directory where the docker-compose.yml file is. Then, run the following commands

1. Pull the image from Docker Hub to the local machine.

2. Create and Run a Keycloak container

3. Access Keycloak Web console

Access http://localhost:8080 .

Change Ports

In case we wish to change to entry port to something other than 8080 , simply uncomment the commented out lines. Then, comment out - 8080:8080. -Djboss.socket.binding.port-offset=200  changes the port to Keycloak port to 8280  (from 8080 + 200).

Karl San Gabriel

Karl San Gabriel

Professional Software Developer