diff --git a/titan-gremlin/Dockerfile b/titan-gremlin/Dockerfile new file mode 100644 index 00000000..c94336a8 --- /dev/null +++ b/titan-gremlin/Dockerfile @@ -0,0 +1,17 @@ +FROM itzg/ubuntu-openjdk-7 + +MAINTAINER itzg + +RUN apt-get install -y wget unzip + +RUN wget -q -O /tmp/titan.zip http://s3.thinkaurelius.com/downloads/titan/titan-0.5.0-hadoop2.zip +RUN unzip /tmp/titan.zip -d /opt && rm /tmp/titan.zip + +ENV TITAN_HOME /opt/titan-0.5.0-hadoop2 +WORKDIR $TITAN_HOME + +VOLUME ["/conf","/data"] +ADD start-gremlin.sh /opt/start-gremlin.sh + +CMD ["/bin/bash", "-e", "/opt/start-gremlin.sh"] + diff --git a/titan-gremlin/README.md b/titan-gremlin/README.md new file mode 100644 index 00000000..3af4f137 --- /dev/null +++ b/titan-gremlin/README.md @@ -0,0 +1,14 @@ +Runs the Gremlin console from the Titan Graph Database "all" distribution. + +To start the Gremlin console with the default configuration files available: + + docker run -it itzg/titan-gremlin + +In order to adjust or further define property files to use within Gremlin, +attach a host directory to the container's `/conf` such as + + docker run -it -v $(pwd)/conf:/conf itzg/titan-gremlin + +After running once your host directory will be populated with the distribution-default +configuration files. Modify those or add to them and they will available during +the next use of gremlin. diff --git a/titan-gremlin/start-gremlin.sh b/titan-gremlin/start-gremlin.sh new file mode 100755 index 00000000..efbb2c12 --- /dev/null +++ b/titan-gremlin/start-gremlin.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ $(ls /conf|wc -l) = 0 ]; then + cp -r $TITAN_HOME/conf/* /conf +fi + +$TITAN_HOME/bin/gremlin.sh