Thanks Thomas for your reply. I have a few questions on your response. I am still very new to docker, so please bear with me. 
when you say I can set env variables in docker container, would this be sufficient?

First connect to the docker container as:

docker exec -i -t keycloak bash
Then, once I am in the container, I run the following to set env variables?

set DEBUG_MODE=true
set DEBUG_PORT=8787
Then, restart the container as:
docker restart keycloak    (keycloak is the name of my container)
Also, how can I make sure that the env variable got correctly set in the docker container? From inside the container, if I run the command "env", should it list these new env variables if they are added successfully?

Then, when you say "......default on port 8787 which you need to expose on your docker container or use the container interface...", what exactly do you mean? Do you mean some sort of port forwarding? Could you tell me w tohat exactly I need to do with my existing container named as "keycloak"

Then, on eclipse, where you mentioned the settings for the Debug configurations, what should be the hostname there? would it be localhost? or the default machine IP of docker which is Or it should be something else?


On Thu, Jun 30, 2016 at 6:29 PM, Thomas Darimont <> wrote:

you could add -debug flag to the command-line or define the following env variables in your docker container:
set DEBUG_MODE=true
set DEBUG_PORT=8787

this will start keycloak with remote debugging enabled by default on port 8787 which you need to expose on your docker container or use the container interface...

you can then connect to the keycloak instance inside the docker container via the remote debugger from your IDE.
For eclipse just go to "Debug configurations..." -> Remote Java Application -> select your project with the custom authenticator -> adjust hostname and port and click "debug".


2016-07-01 0:26 GMT+02:00 Rashmi Singh <>:
We have a Maven project setup on Eclipse that uses some keycloak features and we generate a jar that contains our AuthenticationProvider classes etc. 
We use docker for the deployment. We basically run a jboss/keycloak image there
We have a shell script that has a bunch of commands to copy our project jars from local to the keycloak image on docker container like:

docker cp /customauthenticator-1.0.0-SNAPSHOT.jar keycloak:/home/modules/xxx.yyy.zz.keycloak.customizations
docker restart keycloak

Running this shell script deploys everything on keycloak on docker.
And so far we are just putting logs throughout our code to debug issues.
We want to be able to setup a debugging environment on our eclipse. I am not sure how to achieve this when we use keycloak. Because, here we basically build our modules or authenticator jars etc and copy them to keycloak directories. So, it's not a standalone project war file that we are directly deploying to app server as such. So, then how do we put our maven project (creating jars etc) in a debug mode in eclipse? Is it possible? How?

keycloak-dev mailing list