dbpedia / lookup

Outputs a list of ranked DBpedia resources for a search string.
Apache License 2.0
185 stars 39 forks source link

Docker image does not work #38

Closed ktk closed 8 years ago

ktk commented 8 years ago

I try to understand the docker image for lookup. The Dockerfile itself is already confusing me as it looks like there is no command executed when the container is started, it stops with a rm command and no service executed.

When I tried building it on my own and executed a shell I cannot execute the jar:

admin@myhost:~/lookup/docker$ docker run -ti -p 1111:1111 lookup /bin/bash
root@6c79e06c73de:/# cd /opt/lookup/
root@6c79e06c73de:/opt/lookup# ls
2015-04  dbpedia-lookup-3.1-jar-with-dependencies.jar
root@6c79e06c73de:/opt/lookup# java -jar dbpedia-lookup-3.1-jar-with-dependencies.jar
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at org.dbpedia.lookup.server.Server$.main(Server.scala:48)
        at org.dbpedia.lookup.server.Server.main(Server.scala)

My expectation is that with the docker image I get a lookup service on port 1111 exposed and I can use this to query. Am I missing something here?

sandroacoelho commented 8 years ago

Hi @ktk,

Thanks for reporting it. We have created a Docker file to put it on the Docker Hub (also you can build from scratch). Our build command stops with a rm just to save space on app layer .

Please try this command:

docker run -p 1111:1111 -it dbpedia/lookup java -jar /opt/lookup/dbpedia-lookup-3.1-jar-with-dependencies.jar /opt/lookup/2015-10/

And then try

http://localhost:1111/api/search/PrefixSearch?QueryClass=&MaxHits=5&QueryString=berl

TODOs for me: