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/18 13:41:58 UTC
incubator-tinkerpop git commit: added a Docker build script
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/docker [created] 1bd126534
added a Docker build script
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1bd12653
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1bd12653
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1bd12653
Branch: refs/heads/docker
Commit: 1bd126534a6def36682cf22cf9d198ef7c6fd971
Parents: 46f4d9d
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Fri Mar 18 13:41:02 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Fri Mar 18 13:41:02 2016 +0100
----------------------------------------------------------------------
bin/docker/Dockerfile | 31 +++++++++++++++++++++++++++
bin/docker/Dockerfile.build | 18 ++++++++++++++++
bin/docker/build.sh | 43 ++++++++++++++++++++++++++++++++++++++
bin/docker/onbuild/Dockerfile | 25 ++++++++++++++++++++++
bin/docker/publish.sh | 27 ++++++++++++++++++++++++
5 files changed, 144 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1bd12653/bin/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/bin/docker/Dockerfile b/bin/docker/Dockerfile
new file mode 100644
index 0000000..7aa124a
--- /dev/null
+++ b/bin/docker/Dockerfile
@@ -0,0 +1,31 @@
+# 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/1bd12653/bin/docker/Dockerfile.build
----------------------------------------------------------------------
diff --git a/bin/docker/Dockerfile.build b/bin/docker/Dockerfile.build
new file mode 100644
index 0000000..1b07b35
--- /dev/null
+++ b/bin/docker/Dockerfile.build
@@ -0,0 +1,18 @@
+# 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/1bd12653/bin/docker/build.sh
----------------------------------------------------------------------
diff --git a/bin/docker/build.sh b/bin/docker/build.sh
new file mode 100755
index 0000000..3879ed7
--- /dev/null
+++ b/bin/docker/build.sh
@@ -0,0 +1,43 @@
+#!/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`
+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/1bd12653/bin/docker/onbuild/Dockerfile
----------------------------------------------------------------------
diff --git a/bin/docker/onbuild/Dockerfile b/bin/docker/onbuild/Dockerfile
new file mode 100644
index 0000000..9706d12
--- /dev/null
+++ b/bin/docker/onbuild/Dockerfile
@@ -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 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/1bd12653/bin/docker/publish.sh
----------------------------------------------------------------------
diff --git a/bin/docker/publish.sh b/bin/docker/publish.sh
new file mode 100755
index 0000000..3260532
--- /dev/null
+++ b/bin/docker/publish.sh
@@ -0,0 +1,27 @@
+#!/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