This is DemocracyOS official Keycloak Docker image for development. It's based on Keycloak Official Docker Image, starting with 4.4.0.Final version.
$ sudo docker pull democracyos/keycloak:4.4.0
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
Browse to http://localhost:8080 and go to Administration Console.
Login with user: democracyos and password: democracyos.
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
DemocracyOS theme files are inside democracyos/
directory while custom configurations reside in customization
directory. All content is copied during docker build.
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).