[keycloak-user] How do you export a REALM from keycloak when running within a Docker container?

Bruno Oliveira bruno at abstractj.org
Wed Apr 17 00:10:53 EDT 2019


Hi Melissa, try something like this:

docker run -d --name keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8080:8080 \
-v /path/to/yourrealm.json:/somepath/yourrealm.json \
-it jboss/keycloak:master \
-Dkeycloak.migration.action=import \
-Dkeycloak.migration.provider=singleFile \
-Dkeycloak.migration.file=/somepath/yourrealm.json \
-Dkeycloak.migration.strategy=OVERWRITE_EXISTING

I took all the information from
https://hub.docker.com/r/jboss/keycloak/. I hope it helps.

On 2019-04-15, Melissa Palmer wrote:
> Hi
> 
> How do you export a REALM from keycloak when running within a Docker
> container?
> 
> *If running Keycloak via docker, eg: using *
> docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin
> -e DB_VENDOR=h2 --name kc jboss/keycloak
> 
> How can you export a realm that you have added via the UI?
> 
> Thanks in Advance
> Melissa
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user

-- 

abstractj


More information about the keycloak-user mailing list