title: Remote debug Spring Boot application
body: <p>I've a simple (dockerized) Web Application in Spring Boot.</p>
  
  <p>The App compile correctly.
  The container build fine without errors.
  The App is running fine on localhost:8080, It's a simple "Hello World".</p>
  
  <p>Now I'm trying to attach Spring Tool Suite debugger to the containerized JVM with Remote debugging but without success.</p>
  
  <p>The fault message is</p>
  
  <pre><code>Failed to connect to remote VM com.sun.jdi.connect.spi.ClosedConnectionException
  </code></pre>
  
  <p>This is my Dockerfile:</p>
  
  <pre><code>FROM openjdk:8-alpine
  WORKDIR /
  EXPOSE 8080 8000
  COPY target /
  </code></pre>
  
  <p>and that's my docker-compose.yml</p>
  
  <pre><code>version: '3.7'
  services:
    web:
      build: .
      ports:
        - "8080:8080"
        - "8000:8000"
      command: java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8000 -jar gs-spring-boot-docker-0.1.0.jar
  </code></pre>
  
  <p>In Spring Tool Suite I have these settings for remote debugging:</p>
  
  <pre><code>Remote Java Application
  - Connection type: Standard (Socket attach)
  - Host: localhost
  - port: 8000
  </code></pre>
  
  <p>I'm using a Macbook Pro with OSX Mojave (10.14.6)
  Thanks for any suggetion.</p>