Skip to content

Instantly share code, notes, and snippets.

@gokman
Created June 9, 2017 08:13
Show Gist options
  • Save gokman/42f0f0f1ce63fc597ead0d344c460a3c to your computer and use it in GitHub Desktop.
Save gokman/42f0f0f1ce63fc597ead0d344c460a3c to your computer and use it in GitHub Desktop.
spring boot debug in docker
# create spring boot container
docker run -d -e "JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n"
-p 8081:8081
-p 5005:5005
--name <container name> <image name>
# create debug configuration in intellij
go Run/Debug Configurations
click + button
choose Remote
enter host and port
# finally execute new remote debug configuration
choose remote debug configuration that created above
click debug option
Thats it!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment