Documentation PR: Describe how to connect to Keycloak using a java debugger

1,452 views
Skip to first unread message

Peter Valdemar Mørch

unread,
Nov 23, 2020, 1:45:43 PM11/23/20
to Keycloak Dev
Hi,

While developing SPIs I've found it handy to be able to connect with the Intellij (or other Java) debugger to the keycloak image running in a docker container. I've figured out how to do that, and would like to add the relevant documentation to https://github.com/keycloak/keycloak-containers/blob/master/server/README.md so that it eventually ends up in the documentation at https://hub.docker.com/r/jboss/keycloak/

https://github.com/keycloak/keycloak/blob/master/CONTRIBUTING.md says to write here first, so I'll do that now.

Attaching to Keycloak can be done in (at least) two ways:

This way is documented in standalone.sh, to which all CMD options are passed:

    docker run -p 8080:8080 -p '8787:8787' jboss/keycloak -b 0.0.0.0 --debug '*:8787'

And this way - it has a not-documented-in-standalone.sh smell, but is more docker-y:

    docker run -e DEBUG=true -e DEBUG_PORT='*:8787' -p 8080:8080 -p '8787:8787' jboss/keycloak

A) Would a PR documenting how to attach a debugger be considered?
B) Which variant would you prefer in a PR?

If I don't hear anything to the contrary, I'll create a JIRA issue for this, and post a PR using the --debug approach, since it is documented in standalone.sh, even though I personally prefer the envs approach.

Sincerely,

Peter

Sebastian Łaskawiec

unread,
Nov 24, 2020, 2:52:50 AM11/24/20
to Peter Valdemar Mørch, Keycloak Dev
Hey Peter!

Thanks for looking into this!

I prefer option B as it's more natural for Docker/Podman users. Once you send a Pull Request, please ping me - I'll review it.

Thanks,
Sebastian

--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/71c0c480-f2ad-4598-9c21-da40ad77e1d6n%40googlegroups.com.


--
Sebastian Łaskawiec

Peter Valdemar Mørch

unread,
Dec 1, 2020, 11:34:39 AM12/1/20
to Keycloak Dev
Reply all
Reply to author
Forward
0 new messages