I am trying to Dockerise an app which uses the Quart package.
Dockerfile:
FROM python:3.11 AS backend-build
COPY backend /app/backend
WORKDIR /app/backend
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["python", "-m", "quart", "--app", "main:app", "run", "--port", "5000", "--host", "localhost", "--reload"]
Docker image gets built but when I start it and try to access the web at http://localhost:5000/ I see HTTP ERROR 403.
localhostto0.0.0.0inCMD. See this post for why.-p 5000:5000.main.pyrequirements.txtDockerfileScreenshot below shows container running and demo page being accessed on http://localhost:5000.