I built a docker image based on stable-diffusion-webui and after the container started I wouldn't be able to access the web server inside the docker.
I entered the docker image and make sure the server is working:
$ docker exec -it d29e04e6ca24 bash
---Inside Docker---
root@d29e04e6ca24:/sd# curl -sS -D - localhost:7860 -o /dev/null
HTTP/1.1 200 OK
date: Wed, 05 Jul 2023 23:49:47 GMT
server: uvicorn
content-length: 671907
content-type: text/html; charset=utf-8
However when I go back to the host machine then I failed to access the server:
$ docker container port d29e04e6ca24
7860/tcp -> 0.0.0.0:7860
7860/tcp -> [::]:7860
$ curl -sS -D - localhost:7860 -o /dev/null
curl: (56) Recv failure: Connection reset by peer
Here is the Dockerfile.
Not sure how should I tackle this problem. Thanks in advance.
docker container port
, I thought the port should be published. Not sure how could I check? Thanks – Winston Jul 06 '23 at 01:17