rochacbruno / nameko-example

Code for example in this post: http://brunorocha.org/python/microservices-with-python-rabbitmq-and-nameko.html
192 stars 64 forks source link

Empty reply on http://localhost:5000/apidocs/index.html when in docker container #2

Open tjhgit opened 7 years ago

tjhgit commented 7 years ago

Hi,

I tried to run the api.py code in a docker container, but navigating to the /apidocs/ route does not get the expected swagger page, instead "localhost didn’t send any data."

Here is my Dockerfile: FROM python:3.6-alpine

RUN mkdir /code WORKDIR /code ADD api/ /code/ ADD requirements_api.txt /code/requirements.txt

RUN apk update \ && apk add build-base musl openssl ca-certificates py-openssl wget \ && pip install -r requirements.txt

EXPOSE 5000 CMD ["python", "/code/api.py"]

and the requirements_api.txt nameko flask flasgger

What I am doing wrong? Do I need to install swagger as well somehow?

rochacbruno commented 7 years ago

is http://localhost:5000/apidocs/ working?

tjhgit commented 7 years ago

No, not when using docker.