You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2016/03/19 17:03:39 UTC

incubator-tinkerpop git commit: refactored and improved Docker integration

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/docker d78828152 -> 48b2b2a5f


refactored and improved Docker integration


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/48b2b2a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/48b2b2a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/48b2b2a5

Branch: refs/heads/docker
Commit: 48b2b2a5fe4dfd987032ac824d3f4f640daaaa9c
Parents: d788281
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Sat Mar 19 17:02:57 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sat Mar 19 17:02:57 2016 +0100

----------------------------------------------------------------------
 .dockerignore                           | 13 +++++
 bin/docker/Dockerfile                   | 31 ----------
 bin/docker/Dockerfile.build             | 18 ------
 bin/docker/build.sh                     | 43 --------------
 bin/docker/onbuild/Dockerfile           | 25 --------
 bin/docker/publish.sh                   | 27 ---------
 docker/Dockerfile                       | 42 ++++++++++++++
 docker/build-containers.sh              | 61 +++++++++++++++++++
 docker/build.sh                         | 49 ++++++++++++++++
 docker/build/Dockerfile.template        | 22 +++++++
 docker/hadoop/Dockerfile.template       | 25 ++++++++
 docker/hadoop/install.sh                | 37 ++++++++++++
 docker/hadoop/resources/core-site.xml   |  8 +++
 docker/hadoop/resources/hdfs-site.xml   |  8 +++
 docker/hadoop/resources/mapred-site.xml | 24 ++++++++
 docker/hadoop/resources/yarn-site.xml   | 16 +++++
 docker/resources/groovy/grapeConfig.xml | 16 +++++
 docker/scripts/build.sh                 | 87 ++++++++++++++++++++++++++++
 18 files changed, 408 insertions(+), 144 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/.dockerignore
----------------------------------------------------------------------
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..4749818
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,13 @@
+**/*.log
+**/target
+*.iml
+.idea
+**/*.DS_Store
+.classpath
+.project
+.settings
+**/_bsp/
+docs/*.asciidoc
+**/ext
+Dockerfile
+.dockerignore

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/bin/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/bin/docker/Dockerfile b/bin/docker/Dockerfile
deleted file mode 100644
index 7aa124a..0000000
--- a/bin/docker/Dockerfile
+++ /dev/null
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-FROM ubuntu:trusty
-
-MAINTAINER Daniel Kuppitz <me...@gremlin.guru>
-
-RUN \
-  apt-get update && \
-  apt-get -y install software-properties-common python-software-properties && \
-  echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
-  add-apt-repository -y ppa:webupd8team/java && \
-  apt-get update && \
-  apt-get install -y oracle-java8-installer git maven && \
-  rm -rf /var/lib/apt/lists/* /var/cache/oracle-jdk8-installer
-
-ENV JAVA_HOME /usr/lib/jvm/java-8-oracle

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/bin/docker/Dockerfile.build
----------------------------------------------------------------------
diff --git a/bin/docker/Dockerfile.build b/bin/docker/Dockerfile.build
deleted file mode 100644
index 1b07b35..0000000
--- a/bin/docker/Dockerfile.build
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-FROM dkuppitz/tinkerpop:onbuild

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/bin/docker/build.sh
----------------------------------------------------------------------
diff --git a/bin/docker/build.sh b/bin/docker/build.sh
deleted file mode 100755
index cf73976..0000000
--- a/bin/docker/build.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-DIR=`dirname $0`
-TINKERPOP_BUILD_OPTIONS=${@:-"-DskipIntegrationTests=false -DincludeNeo4j"}
-
-function cleanup {
-  if [[ "$(docker images -q tinkerpop:build 2> /dev/null)" == "" ]]; then
-    docker rmi tinkerpop:build
-  fi
-  rm -f ${DIR}/../../Dockerfile
-}
-trap cleanup EXIT
-
-pushd ${DIR}/../.. > /dev/null
-
-cp bin/docker/Dockerfile.build Dockerfile
-cat >> Dockerfile <<EOF
-CMD ["sh", "-c", "mvn clean install ${TINKERPOP_BUILD_OPTIONS}"]
-EOF
-
-docker build -t tinkerpop:build .
-docker run --rm tinkerpop:build
-
-popd > /dev/null

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/bin/docker/onbuild/Dockerfile
----------------------------------------------------------------------
diff --git a/bin/docker/onbuild/Dockerfile b/bin/docker/onbuild/Dockerfile
deleted file mode 100644
index 9706d12..0000000
--- a/bin/docker/onbuild/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-FROM dkuppitz/tinkerpop:base
-
-MAINTAINER Daniel Kuppitz <me...@gremlin.guru>
-
-RUN mkdir -p /usr/src/tinkerpop
-WORKDIR /usr/src/tinkerpop
-
-ONBUILD COPY . /usr/src/tinkerpop

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/bin/docker/publish.sh
----------------------------------------------------------------------
diff --git a/bin/docker/publish.sh b/bin/docker/publish.sh
deleted file mode 100755
index 3260532..0000000
--- a/bin/docker/publish.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-DIR=`dirname $0`
-
-docker build -t dkuppitz/tinkerpop:base ${DIR}
-docker build -t dkuppitz/tinkerpop:onbuild ${DIR}/onbuild
-
-docker push dkuppitz/tinkerpop

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000..87e8b07
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM ubuntu:trusty
+
+MAINTAINER Daniel Kuppitz <me...@gremlin.guru>
+
+RUN apt-get update \
+    && apt-get -y install software-properties-common python-software-properties \
+    && echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
+    && add-apt-repository -y ppa:webupd8team/java \
+    && apt-get update \
+    && apt-get install -y oracle-java8-installer curl gawk git maven openssh-server \
+    && rm -rf /var/lib/apt/lists/* /var/cache/oracle-jdk8-installer
+
+RUN sed -i 's@PermitRootLogin without-password@PermitRootLogin yes@' /etc/ssh/sshd_config
+RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuuid.so@g' /etc/pam.d/sshd
+RUN ssh-keygen -t rsa -f ~/.ssh/id_rsa -N '' \
+    && cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
+
+ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
+
+RUN sed -i 's/.*"$PS1".*/# \0/' ~/.bashrc
+RUN echo "export JAVA_HOME=${JAVA_HOME}" >> ~/.bashrc
+
+RUN echo "Host *" >> ~/.ssh/config
+RUN echo "  UserKnownHostsFile /dev/null" >> ~/.ssh/config
+RUN echo "  StrictHostKeyChecking no" >> ~/.ssh/config

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/build-containers.sh
----------------------------------------------------------------------
diff --git a/docker/build-containers.sh b/docker/build-containers.sh
new file mode 100755
index 0000000..f997154
--- /dev/null
+++ b/docker/build-containers.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+DIR=`dirname $0`
+FORCE=
+HADOOP_VERSION=
+
+function cleanup {
+  rm -f ${DIR}/hadoop/Dockerfile
+}
+trap cleanup EXIT
+
+while [ "$1" ]; do
+  case "$1" in
+    -f | --force ) FORCE=true; shift ;;
+    -h | --hadoop ) HADOOP_VERSION="$2"; shift 2 ;;
+  esac
+done
+
+pushd ${DIR} > /dev/null
+
+function findByTag {
+  docker images tinkerpop | tail -n+2 | awk "{if (\$2==\"$1\") print \$3}"
+}
+
+if [ ! -z ${FORCE} ]; then
+  for tag in "hadoop-${HADOOP_VERSION}" "base"; do
+    if [ ! -z $(findByTag "${tag}") ]; then
+      docker rmi tinkerpop:${tag}
+    fi
+  done
+fi
+
+if [ -z $(findByTag "base") ]; then
+  docker build -t tinkerpop:base .
+fi
+
+if [ -z $(findByTag "hadoop-${HADOOP_VERSION}") ]; then
+  sed -e "s/HADOOP_VERSION\$/${HADOOP_VERSION}/" hadoop/Dockerfile.template > hadoop/Dockerfile
+  docker build -t tinkerpop:hadoop-${HADOOP_VERSION} hadoop
+fi
+
+popd > /dev/null

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/build.sh
----------------------------------------------------------------------
diff --git a/docker/build.sh b/docker/build.sh
new file mode 100755
index 0000000..cbd15b6
--- /dev/null
+++ b/docker/build.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+DIR=`dirname $0`
+PROJECT_HOME=${DIR}/../
+
+function cleanup {
+  BUILD_IMAGE=$(docker images tinkerpop | awk '{if ($2 == "build") print $3}')
+  [ ! -z ${BUILD_IMAGE} ] && docker rmi ${BUILD_IMAGE}
+  rm -f ${PROJECT_HOME}/Dockerfile
+}
+trap cleanup EXIT
+
+case "$1" in
+  -h | --help ) ${DIR}/scripts/build.sh -h; exit 0 ;;
+esac
+
+pushd ${PROJECT_HOME} > /dev/null
+
+HADOOP_VERSION=$(cat pom.xml | grep -o '<hadoop.version>[^<]*' | head -n1 | grep -o '>.*' | cut -d '>' -f2)
+
+docker/build-containers.sh -h "${HADOOP_VERSION}"
+
+sed -e "s/HADOOP_VERSION\$/${HADOOP_VERSION}/" docker/build/Dockerfile.template > Dockerfile
+cat >> Dockerfile <<EOF
+CMD ["sh", "-c", "docker/scripts/build.sh $@"]
+EOF
+
+docker build -t tinkerpop:build .
+docker run --rm -ti tinkerpop:build
+
+popd > /dev/null

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/build/Dockerfile.template
----------------------------------------------------------------------
diff --git a/docker/build/Dockerfile.template b/docker/build/Dockerfile.template
new file mode 100644
index 0000000..84f551d
--- /dev/null
+++ b/docker/build/Dockerfile.template
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM tinkerpop:hadoop-HADOOP_VERSION
+
+RUN mkdir -p /usr/src/tinkerpop
+WORKDIR /usr/src/tinkerpop
+COPY . /usr/src/tinkerpop

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/hadoop/Dockerfile.template
----------------------------------------------------------------------
diff --git a/docker/hadoop/Dockerfile.template b/docker/hadoop/Dockerfile.template
new file mode 100644
index 0000000..33277e9
--- /dev/null
+++ b/docker/hadoop/Dockerfile.template
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM tinkerpop:base
+
+MAINTAINER Daniel Kuppitz <me...@gremlin.guru>
+
+ENV HADOOP_VERSION HADOOP_VERSION
+
+COPY install.sh /usr/local/sbin/install-hadoop.sh
+RUN /usr/local/sbin/install-hadoop.sh

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/hadoop/install.sh
----------------------------------------------------------------------
diff --git a/docker/hadoop/install.sh b/docker/hadoop/install.sh
new file mode 100755
index 0000000..c9a513c
--- /dev/null
+++ b/docker/hadoop/install.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+HADOOP_BASENAME="hadoop-${HADOOP_VERSION}"
+
+[ -d "/usr/local/lib/${HADOOP_BASENAME}" ] && exit
+
+APACHE_MIRROR=$(curl -s http://www.apache.org/dyn/closer.cgi | grep -Po '(?<=<a href=").*(?="><strong>)' | head -n1)
+HADOOP_DOWNLOAD_URL="${APACHE_MIRROR}hadoop/common/${HADOOP_BASENAME}/${HADOOP_BASENAME}.tar.gz"
+
+pushd /usr/local/lib > /dev/null
+curl ${HADOOP_DOWNLOAD_URL} | tar xz
+popd > /dev/null
+
+cat >> ~/.bashrc <<EOF
+export USER=`whoami`
+export HADOOP_PREFIX=/usr/local/lib/${HADOOP_BASENAME}
+export PATH="\${PATH}:\${HADOOP_PREFIX}/bin"
+export CLASSPATH="\${CLASSPATH}:\${HADOOP_PREFIX}/etc/hadoop"
+EOF

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/hadoop/resources/core-site.xml
----------------------------------------------------------------------
diff --git a/docker/hadoop/resources/core-site.xml b/docker/hadoop/resources/core-site.xml
new file mode 100644
index 0000000..6e89d5b
--- /dev/null
+++ b/docker/hadoop/resources/core-site.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+    <property>
+        <name>fs.defaultFS</name>
+        <value>hdfs://localhost:9000</value>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/hadoop/resources/hdfs-site.xml
----------------------------------------------------------------------
diff --git a/docker/hadoop/resources/hdfs-site.xml b/docker/hadoop/resources/hdfs-site.xml
new file mode 100644
index 0000000..4987605
--- /dev/null
+++ b/docker/hadoop/resources/hdfs-site.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+    <property>
+        <name>dfs.replication</name>
+        <value>1</value>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/hadoop/resources/mapred-site.xml
----------------------------------------------------------------------
diff --git a/docker/hadoop/resources/mapred-site.xml b/docker/hadoop/resources/mapred-site.xml
new file mode 100644
index 0000000..1b46908
--- /dev/null
+++ b/docker/hadoop/resources/mapred-site.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+  <property>
+    <name>mapreduce.framework.name</name>
+    <value>yarn</value>
+  </property>
+  <property>
+    <name>mapred.map.tasks</name>
+    <value>2</value>
+  </property>
+  <property>
+    <name>mapred.reduce.tasks</name>
+    <value>2</value>
+  </property>
+  <property>
+    <name>mapreduce.job.counters.limit</name>
+    <value>1000</value>
+  </property>
+  <property>
+    <name>mapreduce.jobtracker.address</name>
+    <value>localhost:9001</value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/hadoop/resources/yarn-site.xml
----------------------------------------------------------------------
diff --git a/docker/hadoop/resources/yarn-site.xml b/docker/hadoop/resources/yarn-site.xml
new file mode 100644
index 0000000..8da96dc
--- /dev/null
+++ b/docker/hadoop/resources/yarn-site.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+    <property>
+        <name>yarn.nodemanager.aux-services</name>
+        <value>mapreduce_shuffle</value>
+    </property>
+    <property>
+        <name>yarn.nodemanager.vmem-check-enabled</name>
+        <value>false</value>
+    </property>
+    <property>
+        <name>yarn.nodemanager.vmem-pmem-ratio</name>
+        <value>4</value>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/resources/groovy/grapeConfig.xml
----------------------------------------------------------------------
diff --git a/docker/resources/groovy/grapeConfig.xml b/docker/resources/groovy/grapeConfig.xml
new file mode 100644
index 0000000..1cdfeb4
--- /dev/null
+++ b/docker/resources/groovy/grapeConfig.xml
@@ -0,0 +1,16 @@
+<ivysettings>
+  <settings defaultResolver="downloadGrapes"/>
+  <resolvers>
+    <chain name="downloadGrapes">
+      <filesystem name="cachedGrapes">
+        <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
+        <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
+      </filesystem>
+      <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
+      <ibiblio name="central" root="http://central.maven.org/maven2/" m2compatible="true"/>
+      <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
+      <ibiblio name="hyracs-releases" root="http://obelix.ics.uci.edu/nexus/content/groups/hyracks-public-releases/" m2compatible="true"/>
+      <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
+    </chain>
+  </resolvers>
+</ivysettings>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/48b2b2a5/docker/scripts/build.sh
----------------------------------------------------------------------
diff --git a/docker/scripts/build.sh b/docker/scripts/build.sh
new file mode 100755
index 0000000..4f2d747
--- /dev/null
+++ b/docker/scripts/build.sh
@@ -0,0 +1,87 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+RUN_TESTS=
+RUN_INTEGRATION_TESTS=
+INCLUDE_NEO4J=
+BUILD_JAVA_DOCS=
+BUILD_USER_DOCS=
+
+function usage {
+  echo -e "\nUsage: `basename $0` [OPTIONS]" \
+          "\nBuild the current local TinkerPop project in a Docker container." \
+          "\n\nOptions are:\n" \
+          "\n\t-t, --tests              run standard test suite" \
+          "\n\t-i, --integration-tests  run integration tests" \
+          "\n\t-n, --neo4j              include Neo4j" \
+          "\n\t-j, --java-docs          build Java docs" \
+          "\n\t-d, --docs               build user docs" \
+          "\n\t-h, --help               show this message" \
+          "\n"
+}
+
+while [ ! -z "$1" ]; do
+  case "$1" in
+    -t | --tests ) RUN_TESTS=tue; shift ;;
+    -i | --integration-tests ) RUN_INTEGRATION_TESTS=true; shift ;;
+    -n | --neo4j ) INCLUDE_NEO4J=true; shift ;;
+    -j | --java-docs ) BUILD_JAVA_DOCS=true; shift ;;
+    -d | --docs ) BUILD_USER_DOCS=true; shift ;;
+    -h | --help ) usage; exit 0 ;;
+    *) usage 1>&2; exit 1 ;;
+  esac
+done
+
+TINKERPOP_BUILD_OPTIONS=""
+
+[ -z "${RUN_TESTS}" ] && TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DskipTests"
+[ -z "${RUN_INTEGRATION_TESTS}" ] || TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DskipIntegrationsTests=false"
+[ -z "${INCLUDE_NEO4J}" ] || TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DincludeNeo4j"
+[ -z "${BUILD_JAVA_DOCS}" ] && TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -Dmaven.javadoc.skip=true"
+
+mvn clean install ${TINKERPOP_BUILD_OPTIONS}
+
+if [ ! -z "${BUILD_USER_DOCS}" ]; then
+
+  source ~/.bashrc
+
+  echo -e "Host *\n  UserKnownHostsFile /dev/null\n  StrictHostKeyChecking no" > ~/.ssh/config
+  service ssh start
+
+  # start Hadoop
+  cp bin/docker/hadoop/resources/* ${HADOOP_PREFIX}/etc/hadoop/
+  hdfs namenode -format
+  ${HADOOP_PREFIX}/sbin/start-dfs.sh
+  hdfs dfs -mkdir /user
+  hdfs dfs -mkdir /user/${USER}
+  ${HADOOP_PREFIX}/sbin/start-yarn.sh
+
+  # build docs
+  mkdir -p ~/.groovy
+  cp bin/docker/resources/groovy/grapeConfig.xml ~/.groovy/
+  bin/process-docs.sh
+
+  # start a simple HTTP server
+  IP=$(ifconfig | grep -Po '(?<=inet addr:)[0-9.]*' | head -n1)
+  echo -e "\nDocs can be viewed under http://${IP}/\n"
+  cd target/docs/htmlsingle/
+  python -m SimpleHTTPServer 80
+fi
+