Skip to content

Import a keycloak Realm with docker on Windows 10

Open a Cygwin bash

  • Just type bash on your windows CMD

Prepare import Script location

 $ dir d:/dev/quarkus/security-keycloak-authorization-quickstart/import

$ ls -l d:/dev/quarkus/security-keycloak-authorization-quickstart/import
  -rw-r--r-- 1 Helmut None 75534 Jan 22 11:38 realm-export.json

Run import

  • Share Windows folder by : -v “d:/dev/quarkus/security-keycloak-authorization-quickstart/import:/opt/jboss/keycloak/imports”
  • Add -Dkeycloak.profile.feature.upload_scripts=enabled” to your KEYCLOAK_IMPORT variable
$ docker run --name keycloak2 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8280:8080 -p 8543:8443 \
   -v "d:/dev/quarkus/security-keycloak-authorization-quickstart/import:/opt/jboss/keycloak/imports" \
   -e KEYCLOAK_IMPORT="/opt/jboss/keycloak/imports/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled" \


Published inAllgemein

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *