title: Making a REST Call to Endpoint in Dockers
body: <p>I am building a Spring Boot application, which has a few different REST endpoints. It can be locally packaged and launched as a jar file successfully. When running locally, I can access its endpoints via "<a href="http://localhost:8080/endpoint?params" rel="noreferrer">http://localhost:8080/endpoint?params</a>..". I was tasked with now preparing this application to run off of Dockers. Still working on my local machine, I have created a Dockers container based off of the Java:8 image. In this container, I have been able to run my application from the .jar successfully. My issue is, I do not understand how to call to the REST endpoints inside the application, when the application is hosted off of Docker, since logically localhost:8080/endpoint is no longer responsive to the call.</p>
  
  <p>Side information: My local computer is Windows, the Docker image is Ubuntu (eventually will be launched onto a Linux server).</p>
  
  <p>UPDATE: Created a new image with the following Dockerfile:</p>
  
  <pre><code>FROM openjdk:8
  MAINTAINER  My Name email@email.com
  COPY . /usr/src/myapp
  WORKDIR /usr/src/myapp
  EXPOSE 8080
  RUN javac Main.java
  CMD ["java", "Main"]
  </code></pre>
  
  <p>Same issue, cannot access endpoint via <a href="http://localhost:8080/endpoint" rel="noreferrer">http://localhost:8080/endpoint</a></p>
  
  <p>Any help will be appreciated. Thank you!</p>