Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 3.53 KB

README.md

File metadata and controls

69 lines (55 loc) · 3.53 KB

DemocracyOS Docker Keycloak Image

This is DemocracyOS official Keycloak Docker image for development. It's based on Keycloak Official Docker Image, starting with 4.4.0.Final version.

Quickstart


Pull this image

$ sudo docker pull democracyos/keycloak:4.4.0

Start keycloak

Nice to read multiline

$ sudo docker run -d --name keycloak \
                  -p 8080:8080 \
                  -e "KEYCLOAK_USER=democracyos" \
                  -e "KEYCLOAK_PASSWORD=democracyos" \
                  -e "KEYCLOAK_WELCOME_THEME=democracyos" \
                  democracyos/keycloak:4.4.0.Final

Copy & Paste friendly one-liner

$ sudo docker run -d --name keycloak -p 8080:8080 -e "KEYCLOAK_USER=democracyos" -e "KEYCLOAK_PASSWORD=democracyos" -e "KEYCLOAK_WELCOME_THEME=democracyos" democracyos/keycloak:4.4.0.Final

Access Keycloak

Browse to http://localhost:8080 and go to Administration Console. Keycloak landing

Login with user: democracyos and password: democracyos. Keycloak login

Set DemocracyOS theme Keycloak theme configuration

Customize DemocracyOS theme


Themes are built with Apache FreeMarker. This keycloak docker installation is configured to instantly reflect changes in theme files for development purposes. More on this in the Official Documentation.

To live edit DemocracyOS, with this repository files please run:

Nice to read multiline

$ sudo docker run -d --name keycloak \
                  -p 8080:8080 \
                  -e "KEYCLOAK_USER=democracyos" \
                  -e "KEYCLOAK_PASSWORD=democracyos" \
                  -e "KEYCLOAK_WELCOME_THEME=democracyos" \
                  -v $(pwd)/democracyos:/opt/jboss/keycloak/democracyos:rw
                  democracyos/keycloak:4.4.0.Final

Copy & Paste friendly one-liner

$ sudo docker run -d --name keycloak -p 8080:8080 -e "KEYCLOAK_USER=democracyos" -e "KEYCLOAK_PASSWORD=democracyos" -e "KEYCLOAK_WELCOME_THEME=democracyos" -v $(pwd)/democracyos:/opt/jboss/keycloak/democracyos:rw democracyos/keycloak:4.4.0.Final

Docker Image files

DemocracyOS theme files are inside democracyos/ directory while custom configurations reside in customization directory. All content is copied during docker build.

Docker Environment Variables


As seen in Start Keycloak section, some variables are needed to bootstrap Keycloak. As this is an extension of the official Docker image we recommend reading through the Official Docker Image Documentation. Variables shown here are:

  • KEYCLOAK_USER: set keycloak admin user. There's no default value, if it is not set then direct access to container shell is needed to use kcadm.
  • KEYCLOAK_PASSWORD: set keycloak admin user password. There's no default value, if it is not set then direct access to container shell is needed to use kcadm.
  • KEYCLOAK_WELCOME_THEME: specify the theme to use for welcome page (must be non empty and must match an existing theme name).