{"id":1414,"date":"2021-04-14T19:21:18","date_gmt":"2021-04-14T10:21:18","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/?p=1414"},"modified":"2021-04-14T19:22:05","modified_gmt":"2021-04-14T10:22:05","slug":"remote-java-container-debug","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2021\/04\/14\/remote-java-container-debug\/","title":{"rendered":"\u30ea\u30e2\u30fc\u30c8\u306eDocker\u3067\u52d5\u4f5c\u3059\u308bJava\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"

\u306a\u305c\u30ea\u30e2\u30fc\u30c8\u306eDocker\u3067\u30c7\u30d0\u30c3\u30b0\u3057\u305f\u3044\u306e\u304b<\/h2>\n

Docker for Mac\u306e\u52d5\u4f5c\u304c\u91cd\u304f\u3001\u5909\u66f4\u306e\u53cd\u6620\u3084\u518d\u8d77\u52d5\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u72b6\u614b\u3067\u3042\u3063\u305f\u305f\u3081\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u7acb\u3066\u305fDocker\u3067\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3092\u3057\u305f\u304f\u306a\u308a\u307e\u3057\u305f\u3002IntelliJ IDEA\u306e\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30c3\u30b0\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u3046\u3068\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u5177\u4f53\u7684\u306a\u8a2d\u5b9a\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n

IntelliJ IDEA\u5074\u306e\u8a2d\u5b9a<\/h2>\n

IntelliJ IDEA\u306eRun\/Debug Configuration\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u30c7\u30d0\u30c3\u30b0\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

\u30ea\u30e2\u30fc\u30c8\u306e\u30db\u30b9\u30c8\u3092\u8a2d\u5b9a<\/h3>\n

Run\u30bf\u30d6\u304b\u3089\u300cEdit Configurations...\u300d \u3092\u9078\u629e\u3057\u307e\u3059\u3002
\n\"\"<\/a><\/p>\n

\u300cConfiguration\u300d\u306e\u300cHost\u300d\u306b\u30ea\u30e2\u30fc\u30c8\u306e\u30db\u30b9\u30c8\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u307e\u3059\u3002
\n
\"\"<\/a><\/p>\n

\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u8d77\u52d5\u30b3\u30de\u30f3\u30c9\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a<\/h3>\n

\u300cCommand line arguments for remote JVM\u300d\u306e\u5185\u5bb9\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\uff08\u5f8c\u307b\u3069\u30b3\u30f3\u30c6\u30ca\u5074\u306e\u8a2d\u5b9a\u3067\u5fc5\u8981\uff09<\/p>\n

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005<\/code><\/pre>\n

\u4ee5\u4e0a\u3067\u3001IDE\u5074\u306e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n

\u30b3\u30f3\u30c6\u30ca\u306e\u8a2d\u5b9a<\/h3>\n

\u5148\u7a0b\u30b3\u30d4\u30fc\u3057\u305f\u5024\u3092\u3001\u5b9f\u884c\u5bfe\u8c61\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e build.gradle \u306ebootRun\u30b3\u30de\u30f3\u30c9\u306b\u5bfe\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n