3

Using swagger-node I setup a project using Express and swagger-ui-express.

Dockerfile

FROM node:8-alpine

WORKDIR /opt/app

COPY package*.json ./
RUN yarn install
COPY . .

CMD [ "yarn", "start" ]

docker-compose.yaml

version: "3"

services:
  app:
    build: .
    ports:
      - 15000:10010

Starting the container

docker-compose up

The graphical API docs are reachable from the outside at http://localhost:15000/api-docs. However I can't use the "Try it out" function as Swagger takes the internal IP and port.

How can I change this so that the API can be tried from outside the container?

enter image description here

Robert Strauch
  • 12,055
  • 24
  • 120
  • 192
  • 2
    Did you find a solution? I have same issue. It's calling the containers port running on Marathon instead of the external port. – Don Aug 15 '18 at 19:35

0 Answers0