Failed to connect when using prism docker

Dear all,
First of all, congratulations for this wonderful tool as Prism.

Here is my problem.

If i use prism (npm install) it works :slight_smile:

 prism mock /tmp/petstore.yaml
[8:36:52 AM] › [CLI] …  awaiting  Starting Prism…
[8:36:52 AM] › [CLI] ℹ  info      GET        http://127.0.0.1:4010/pets?limit=528
[8:36:52 AM] › [CLI] ℹ  info      POST       http://127.0.0.1:4010/pets
[8:36:52 AM] › [CLI] ℹ  info      GET        http://127.0.0.1:4010/pets/velit
[8:36:52 AM] › [CLI] ▶  start     Prism is listening on http://127.0.0.1:4010

curl http://127.0.0.1:4010/pets
[{"id":-9223372036854776000,"name":"string","tag":"string"}][centos@pc-jvu dredd]$ curl http://127.0.0.1:4010/pets

But when I want to use prism in its docker form, the connection fails even by using the “-h 0.0.0.0” option.

sudo docker run --init -it -v /tmp:/tmp -P stoplight/prism:3 mock -h 0.0.0.0 -p 4010 "/tmp/petstore.yaml"
[8:41:56 AM] › [CLI] …  awaiting  Starting Prism…
[8:41:58 AM] › [CLI] ℹ  info      GET        http://0.0.0.0:4010/pets?limit=382
[8:41:58 AM] › [CLI] ℹ  info      POST       http://0.0.0.0:4010/pets
[8:41:58 AM] › [CLI] ℹ  info      GET        http://0.0.0.0:4010/pets/consectetur
[8:41:58 AM] › [CLI] ▶  start     Prism is listening on http://0.0.0.0:4010

curl http://127.0.0.1:4010/pets
curl: (7) Failed to connect to 127.0.0.1 port 4010: Connection refused

Could you help me please ?

Best regards

In fact I have found. The tricky point is that mock parameter are the same as the docker parameter.
So if you want to specify on which port on the local machine the docker listen to :slight_smile:

`sudo docker run --init -it -p EXTERNAL_PORT:INTERNAL_PORT -v /tmp:/tmp -P stoplight/prism:3 mock -h 0.0.0.0 -p INTERNAL_PORT "/tmp/petstore.yaml"`