[keycloak-user] Dockerized Keycloak unreachable from host after migration

Alexandr Pilin alpilin at gmail.com
Thu Apr 19 07:36:35 EDT 2018


 Hi all,

I was trying to use import functionality with Keycloak docker image, and it
seems that import makes Keycloak unreachable from the host. Here is the
command I've used to start docker image:

docker run --name keycloak-demo -p 8180:8080 -e KEYCLOAK_USER=admin -e
KEYCLOAK_PASSWORD=admin -v <path to the folder with exported .json
file>:/opt/jboss/compose-conf jboss/keycloak:3.4.3.Final
-Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=/opt/jboss/compose-conf/keycloak-exported.json
-Dkeycloak.migration.strategy=IGNORE_EXISTING

Container starts without errors in logs, imports all the data, but I cannot
access it by http://localhost:8180 (I've got an empty reply from server) .
Although it is reachable from within container itself. After removing
migration command arguments from "docker run" command everything works.
I've compared logs and didn't found any explanation why this may happen.
The only difference seems to be is an import which completes without
errors.

I've tried with Keycloak. 3.4.3.Final and 4.0.0.beta on Windows and MacOS.
Docker version is 18.03.0-ce-win59 (16762).

I'm doing something wrong, or maybe it is not intended for migration
functionality to be working with the Docker image?


Thank you,


Best regards,
Aleksandr Pilin


More information about the keycloak-user mailing list