microsoft/presidio

Ports mixed up in documentation for Docker

thgla opened this issue · 1 comments

Minor documentation issue, in the docker guide the ports in the installation instructions don't match with the usage instructions.

To start, I went through the linked installation guide, in which the analyzer is started with port 5001:

# Run containers with default ports
docker run -d -p 5001:3000 mcr.microsoft.com/presidio-analyzer:latest

docker run -d -p 5002:3000 mcr.microsoft.com/presidio-anonymizer:latest

Then when I continue with the instructions on the docker guide, the following command is suggested to run a text analysis, using port 5002:

curl -X POST http://localhost:5002/analyze -H "Content-type: application/json" --data "{ \"text\": \"John Smith drivers license is AC432223\", \"language\" : \"en\"}"

That will lead to the following error:

{"error":"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."}

Because it's the wrong service, this is the anonymizer and not the analyzer.

The usage sample should ideally use the same port as mentioned in the install instructions, so I can follow along without needing to make any changes:

curl -X POST http://localhost:5001/analyze -H "Content-type: application/json" --data "{ \"text\": \"John Smith drivers license is AC432223\", \"language\" : \"en\"}"

Thanks! Would you be interested in creating a PR to fix?