title: How to send http request from docker container to the local machine?
body: <p>I have the web application which is running on the docker container and that one must send requests to my local machine (localhost) and when I'm trying to do that I get the following exception:</p>
  
  <pre><code>java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: localhost/127.0.0.1:9033
  </code></pre>
  
  <p>I'm trying to give you some more details. I looked at this <a href="https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach">post</a> but it does not work for me. <br/>
  First of all, I want to explain my project's structure:
  1. I have a project that consist of two parts: frontend (angular 9) and backend (play 2.8.x framework)
  2. I have another one project (web-service)</p>
  
  <p>My first projects (backend, frontend) are placing in the docker container and the second (web-service) is placing at the localhost. I have the following flow between these projects:<br/>
  1. The user sends a request (from the web browser) to the backend it may be login request for instance.<br/>
  2. The backend process this request (retrieve data from the database) and sends these data to the web-service which is placing on the localhost.
  <br/>
  and I have a problem with step 2 where I trying to send data to the web-service. I'm getting the exception which was writing above. <br/>
  I'm trying to set <code>--network=host</code> but in this case, I get <code>404 status code</code> in the browser.
  How can I solve this issue?</p>