RestComm / restcomm-identity

GNU Affero General Public License v3.0
1 stars 4 forks source link

Create customized auth server docker image #26

Open otsakir opened 8 years ago

otsakir commented 8 years ago

Create a keycloak-based docker image with all required customizations to use with Restcomm/SSO out of the box.

The image will be used internally or for non-production purposes initially.

otsakir commented 8 years ago

As a first step, it is worth investigating using the default keycloak image. Maybe with proper command line parameters it can get us started.

otsakir commented 8 years ago

The following will start a new keycloak container and install a new realm using a realm .json file residing on the host machine:

docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin --rm -p 8080:8080 \
-v /tmp/restcomm-realm.json:/tmp/restcomm-realm.json \
jboss/keycloak -b 0.0.0.0 \
-Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/tmp/restcomm-realm.json

In the above example, /tmp/restcomm-realm.json is mapped from host to the container under the same path. In my experiment it was trivial:

{
  "id" : "restcomm2",
  "realm" : "restcomm2"
}

Note, that when such a realm is created a random key pair is generated.