Created
October 2, 2023 12:57
-
-
Save dehidehidehi/2eaaa6013a12f6b3743e0f81a28c796e to your computer and use it in GitHub Desktop.
Dockerfile with Java and remote debugger attached.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:20 | |
EXPOSE 9090 | |
EXPOSE 9091 | |
EXPOSE 9092 | |
COPY /target/${project_name}-*.jar /app/app.jar | |
WORKDIR /app | |
# Enable remote debugging | |
ENTRYPOINT java \ | |
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9091 \ | |
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false \ | |
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9092 \ | |
-jar /app/app.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment