[keycloak-user] initialising docker

Tim Dudgeon tdudgeon.ml at gmail.com
Fri Feb 12 10:14:27 EST 2016


I've been struggling with a clean way to initialize the keycloak docker 
container.
I need to import a realm definition, and the only way I can find is it 
start the image with the import options, wait for this to complete so 
that the database is populated and then to Ctrl-C out and to restart the 
container proper, which is hardly automatable.
With 1.8 this also needs to include defining the admin user.

Is there a cleaner way of achieving this?
For instance, with the postgres docker images you just put any 
initialisation *.sql or *.sh scripts in a specific directory and they 
get executed first time the server starts.

Tim


More information about the keycloak-user mailing list