I'm trying to set a local dbpedia spotlight server with the docker image by calling:
sudo docker run -i -p 2222:80 dbpedia/spotlight-english spotlight.sh
the image runs and I get this when prompting sudo docker ps
:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
02282289ae64 dbpedia/spotlight-english "/bin/sh" About a minute ago Up About a minute 0.0.0.0:2222->80/tcp sleepy_meninsky
but when I send a simple request as:
curl http://0.0.0.0:2222/rest/annotate?text=COOPER+Has+the+FBI+said+anything+about+a+reward+or+anything+%5C%3F+Because+there+was+that+there+was+a+reward+for+finding+her&confidence=0.5
or even one with a header set:
curl -X POST http://localhost:2222/rest/annotate -H 'accept: application/json' -H 'content-type: application/x-www-form-urlencoded' --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance" --data-urlencode "confidence=0.35"
I get the same error:
curl: (56) Recv failure: Connection reset by peer
Can anyone help? Is this related to the need for sudo when I run docker?
Thank you for you time and attention.