title: Error consume route ApiGateway with ocelot and docker service
body: <p>I am creating an ApiGateway with ocelot that consume an Api service in net core.
  The ApiGateway and ApiService are deployed on docker with docker compose of this way:
  <strong>Docker-compose</strong>:</p>
  <pre><code>tresfilos.webapigateway:
  image: ${DOCKER_REGISTRY-}tresfilosapigateway
  build: 
    context: .
    dockerfile: tresfilos.ApiGateway/ApiGw-Base/Dockerfile
  
  tresfilos.users.service:
  image: ${DOCKER_REGISTRY-}tresfilosusersservice
  build: 
    context: .
    dockerfile: tresfilos.Users.Service/tresfilos.Users.Service/Dockerfile
  </code></pre>
  <p><strong>Docker-compose.override</strong>:</p>
  <pre><code>tresfilos.webapigateway:
  environment: 
    - ASPNETCORE_ENVIRONMENT=Development
    - IdentityUrl=http://identity-api
  ports:
    - &quot;7000:80&quot;
    - &quot;7001:443&quot;
  volumes:
    - ./tresfilos.ApiGateway/Web.Bff:/app/configuration
  
  tresfilos.users.service:
  environment: 
    - ASPNETCORE_ENVIRONMENT=Development
    - ASPNETCORE_URLS=https://+:443;http://+:80
  ports:
    - &quot;7002:80&quot;
    - &quot;7003:443&quot;
  volumes:
    - ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
    - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
  </code></pre>
  <p>In <strong>configuration</strong> ocelot apigateway i define <strong>.json</strong> like:</p>
  <pre><code> &quot;ReRoutes&quot;: [
   {
     &quot;DownstreamPathTemplate&quot;: &quot;/api/{version}/{everything}&quot;,
     &quot;DownstreamScheme&quot;: &quot;http&quot;,
     &quot;DownstreamHostAndPorts&quot;: [
       {
         &quot;Host&quot;: &quot;tresfilos.users.service&quot;,
         &quot;Port&quot;: 7002
       }
     ],
     &quot;UpstreamPathTemplate&quot;: &quot;/api/{version}/user/{everything}&quot;,
     &quot;UpstreamHttpMethod&quot;: [ &quot;POST&quot;, &quot;PUT&quot;, &quot;GET&quot; ]
   },
  ],
  &quot;GlobalConfiguration&quot;: {
    &quot;BaseUrl&quot;:  &quot;https://localhost:7001&quot;
   }
  </code></pre>
  <p>When i consume the ApiGateway from the url:
  http://localhost:7000/api/v1/user/Login/authentication</p>
  <p>I have the error in terminal docker:
  <a href="https://i.stack.imgur.com/sDNrc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sDNrc.png" alt="enter image description here" /></a></p>
  <p><strong>Why does the above error occur and how to fix it?</strong></p>