I have already ran a uvicorn server in docker, its running fine too but i am not able to see it
FROM python
RUN pip install fastapi uvicorn mongoengine
EXPOSE 8002
COPY ./app /app
ENV PYTHONPATH "${PYTONPATH}:/app"
VOLUME /app
RUN cd app
CMD ["uvicorn", "main:app", "--host", "127.0.0.1", "--port", "8002"]
This ran successfully and i am seeing this success logs as well
D:\***\****\****>docker logs a1b
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8002 (Press CTRL+C to quit)
On visiting
its saying This page isn’t working
How should i access this then..
On docker ps -a
:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
832bf82a0fb1 edmaskbackend6 "uvicorn main:app ..." 5 seconds ago Up 4 seconds 127.0.0.1:32772->8002/tcp infallible_cray