-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mxdlx
committed
Oct 11, 2018
1 parent
6d03e17
commit e7f7a2e
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
FROM jboss/keycloak:4.4.0.Final | ||
MAINTAINER [email protected] | ||
|
||
ENV KEYCLOAK_USER democracyos | ||
ENV KEYCLOAK_PASSWORD democracyos | ||
ENV KEYCLOAK_WELCOME_THEME democracyos | ||
|
||
COPY democracyos /opt/jboss/keycloak/themes/democracyos | ||
COPY customization/standalone.xml /opt/jboss/keycloak/standalone/configuration/ | ||
COPY customization/standalone-ha.xml /opt/jboss/keycloak/standalone/configuration/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# DemocracyOS Docker Keycloak Image | ||
This is [DemocracyOS](http://democracyos.org/) official [Keycloak](https://www.keycloak.org/) Docker image for development. It's based on [Keycloak Official Docker Image](https://hub.docker.com/r/jboss/keycloak/), starting with 4.4.0.Final version. | ||
|
||
## Quickstart | ||
--- | ||
### Pull this image | ||
```bash | ||
$ sudo docker pull democracyos/keycloak:4.4.0 | ||
``` | ||
|
||
### Start keycloak | ||
```bash | ||
$ sudo docker run -d --name keycloak \ | ||
-p 8080:8080 \ | ||
-e "KEYCLOAK_USER=democracyos" \ | ||
-e "KEYCLOAK_PASSWORD=democracyos" \ | ||
-e "KEYCLOAK_WELCOME_THEME=democracyos" \ | ||
democracyos/keycloak | ||
``` | ||
|
||
### Access Keycloak | ||
Browse to http://localhost:8080 and go to Administration Console. | ||
![Keycloak landing](https://raw.githubusercontent.com/DemocracyOS/keycloak/master/img/kc_1.png) | ||
|
||
Login with user: democracyos and password: democracyos. | ||
![Keycloak login](https://raw.githubusercontent.com/DemocracyOS/keycloak/master/img/kc_2.png) | ||
|
||
Set DemocracyOS theme | ||
![Keycloak theme configuration](https://raw.githubusercontent.com/DemocracyOS/keycloak/master/img/kc_3.png) | ||
|
||
|
||
## Customize DemocracyOS theme | ||
--- | ||
Themes are built with [Apache FreeMarker](https://freemarker.apache.org/). This keycloak docker installation is configured to instantly reflect changes in theme files for development purposes. More on this in the [Official Documentation](https://www.keycloak.org/docs/4.4/server_development/index.html#_themes). | ||
|
||
### 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](https://hub.docker.com/r/jboss/keycloak/). 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](https://www.keycloak.org/docs/4.4/server_admin/#the-admin-cli). | ||
* `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](https://www.keycloak.org/docs/4.4/server_admin/#the-admin-cli). | ||
* `KEYCLOAK_WELCOME_THEME`: specify the theme to use for welcome page (must be non empty and must match an existing theme name). |