Open juliuskrah opened 4 years ago
You can make it work by using an older version of keycloak (6.0.1). Modify etc/docker-compose.yml so that the keycloack image specifie the correct version:
image: jboss/keycloak:6.0.1
I fixed it with a PR #2
change the docker compose file to be: KEYCLOAK_IMPORT: /tmp/one-realm.json,/tmp/two-realm.json -Dkeycloak.profile.feature.upload_scripts=enabled
@LBoraz I didn't work for me on keycloak 11, I get
FATAL [org.keycloak.services] (ServerService Thread Pool -- 69) Error during startup: java.lang.RuntimeException: java.io.FileNotFoundException: /opt/jboss/keycloak/my-realm.json (No such file or directory)
Even though I have verified that file exists there.
My bad @LBoraz , Had to do it in container image, else the file gets removed of something. Anyways works in Dockerfile:
ENV KEYCLOAK_IMPORT "/tmp/my_realm.json" -Dkeycloak.profile.feature.upload_scripts=enabled
The realms
one-relam.json
andtwo-realm.json
are not imported on startup. The following error is observed:When I also try to import it from the keycloak admin console, I get the following exception: