title: Swagger not opening when running in Docker container
body: <p>In my project I have set up Swagger with Swashbuckle like so in my Startup.cs:</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env)
          {
              app.UseSwagger();
              app.UseSwaggerUI(c =&gt;
              {
                  c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
              });
  </code></pre>
  
  <p>When I run my application from Visual Studio I can access <code>localhost:123456/swagger</code> and get the API documentation, like it should be. However when I run my application through Docker with <code>docker-compose up</code> and access <code>docker_machine_IP/swagger</code> it just reroutes me to my applications front page, no Swagger page or errors at all, just back to the same page as if I didn't write <code>/swagger</code> at the end at all. I have tried with several different URLs, <code>/swagger</code>, <code>/swagger-ui.html</code> etc, but no difference. Are there any specific configurations that must be written in the Dockerfile or elsewhere to be able to access the Swagger documentation when running in a Docker container?</p>
  
  <p>Docker-compose file:</p>
  
  <pre><code>version: "3.7"
  services:
    node-frontend:
      container_name: node-frontend
      build: ./ClientApp/
      command: npm run start
      ports:
        - "3000:3000"
    dotnet-backend:
      container_name: dotnet-backend
      build: .
     #expose:
      #  - "80"
      links:
        - mssql-db
      ports:
        - "8000:80"
    nginx-reverse-proxy:
      container_name: nginx-reverse-proxy
      build: ./nginx/
      #command: tail -F /dev/null
      command: nginx -g 'daemon off;'
      ports:
        - "80:80"
      #  - "443:443"
      expose:
        - "80"
        - "443"
      links:
        - node-frontend
        - dotnet-backend
    mssql-db:
      container_name: mssql-db
      #image: mcr.microsoft.com/mssql/server:2019-latest
      build: ./Database
      environment: 
        - SA_PASSWORD=password
        - ACCEPT_EULA=Y
      volumes:
       - ./Database/:/scripts/
      ports:
        - "1433:1433"
      expose:
        - "1433"
      command:
        - /bin/bash
        - -c 
        - |
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
  WORKDIR /app
  
  # Copy csproj and restore as distinct layers
  COPY *.csproj ./
  RUN dotnet restore
  
  # Copy everything else and build
  COPY . ./
  RUN dotnet publish -c Debug -o out Project.csproj
  
  # Build runtime image
  FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
  WORKDIR /app
  COPY --from=build-env /app/out .
  
  EXPOSE 80
  
  ENTRYPOINT ["dotnet", "ProjectApi.dll", "--environment=Development"]
  </code></pre>