Skip to content

Commit

Permalink
Added Dockerfiles for data backends.
Browse files Browse the repository at this point in the history
  • Loading branch information
k0105 committed Jun 6, 2016
1 parent e62d7cc commit dc91ca3
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
38 changes: 38 additions & 0 deletions data/dbpedia/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
######################################
## DBpedia / Freebase Service Image ##
######################################

# Proposed image name: dbpedia
# Readme https://github.com/brmson/yodaqa/blob/master/data/dbpedia/

# Inherit official Java image, see https://hub.docker.com/_/java/
FROM java:8

# Copy fuseki files
ADD ./jena-fuseki-1.1.1 /jena-fuseki-1.1.1

# Same as "export TERM=dumb"; prevents error "Could not open terminal for stdout: $TERM not set"
ENV TERM dumb

# Define working directory
WORKDIR /jena-fuseki-1.1.1

# Expose ports (3030 for Freebase, 3037 for DBpedia)
EXPOSE 3037
EXPOSE 3030

##########
# BEWARE #####################################################################################
# With SELinux you need to run chcon -Rt svirt_sandbox_file_t /run/media/<user>/<longid>/home/<user>/Downloads/Backends/DBpedia/jena-fuseki-1.1.1/db/
##############################################################################################

# Can be built with: "docker build -t fuseki ."

# .:: DBpedia
# docker run -it -v /home/fp/docker/data/db/:/jena-fuseki-1.1.1/db/ --entrypoint="./fuseki-server" -p 3037:3037 fuseki --port 3037 --loc db /dbpedia
# RUN ./fuseki-server --port 3037 --loc db /dbpedia is done in run command; need to map as volume (read-only via :ro)

# .:: Freebase
# docker run -it -v /home/fp/docker/data/d-freebase/:/jena-fuseki-1.1.1/d-freebase/ --entrypoint="./fuseki-server" -p 3030:3030 fuseki --loc d-freebase /freebase
# RUN ./fuseki-server --loc d-freebase /freebase

36 changes: 36 additions & 0 deletions data/enwiki/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
##########################
## enwiki Service Image ##
##########################

# Proposed image name: enwiki
# Readme https://github.com/brmson/yodaqa/tree/master/data/enwiki

# Inherit official Java image, see https://hub.docker.com/_/java/
FROM java:8

# Copy fuseki files
ADD ./solr-4.6.0 /solr-4.6.0


# JAVA_HOME is not set by default
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64/

# Same as "export TERM=dumb"; prevents error "Could not open terminal for stdout: $TERM not set"
ENV TERM dumb

# Define working directory
WORKDIR /solr-4.6.0/example

# Expose port
EXPOSE 8983

##########
# BEWARE #####################################################################################
# With SELinux you need to run chcon -Rt svirt_sandbox_file_t /run/media/<user>/<longid>/home/<user>/Downloads/Backends/enwiki/solr-4.6.0/example/enwiki/collection1/
##############################################################################################

# Can be built with: "docker build -t enwiki ."

# docker run -it -v /run/media/<user>/<longid>/home/<user>/Downloads/Backends/enwiki/solr-4.6.0/example/enwiki/collection1/:/solr-4.6.0/example/enwiki/collection1/ --entrypoint="java" -p 8983:8983 enwiki -Dsolr.solr.home=enwiki -jar start.jar
#docker run -it -v /home/fp/docker/data/enwiki/collection1/:/solr-4.6.0/example/enwiki/collection1/ --entrypoint="java" -p 8983:8983 enwiki -Dsolr.solr.home=enwiki -jar start.jar
# RUN java -Dsolr.solr.home=enwiki -jar start.jar is done in run command; need to map as volume (read-only via :ro)
1 change: 1 addition & 0 deletions data/freebase/Dockerfile_README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See ../dbpedia directory. The Fuseki image can be used for both DBpedia and Freebase depending on which volume is mapped.

0 comments on commit dc91ca3

Please sign in to comment.