Closed thewillyhuman closed 3 years ago
The following docker configuration works if and only if you add a parameter in the app.run(...)
indicating the host as 0.0.0.0. Otherwise, the Flask server is only listening to localhost inside the container.
FROM python:latest
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
EXPOSE 8100
CMD [ "python3", "runserver.py"]
I will try to fix this be means of environment variables instead of changing the base code.
At the time the dockerization process relies on adding app.run(debug=True, port=8100, host='0.0.0.0') to the base code.
Add the needed configuration to the repository to add docker support.