You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by rs...@apache.org on 2020/02/05 10:42:46 UTC

[avro] 01/03: AVRO-2408: Create local dev environment with Apache Forrest (#530)

This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/avro.git

commit e2c7decf9815a594d373eb7135972e44f28df613
Author: Niels Basjes <nb...@bol.com>
AuthorDate: Tue May 28 09:47:21 2019 +0200

    AVRO-2408: Create local dev environment with Apache Forrest (#530)
---
 build.sh                     |  3 ++-
 share/docker/DockerfileLocal | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index 3384d9e..d275337 100755
--- a/build.sh
+++ b/build.sh
@@ -257,7 +257,8 @@ do
         DOCKER_XTRA_ARGS=$2
         shift 2
       fi
-      docker build -t avro-build -f share/docker/Dockerfile .
+      docker build -t avro-build-ci -f share/docker/Dockerfile .
+      docker build -t avro-build -f share/docker/DockerfileLocal .
       if [ "$(uname -s)" == "Linux" ]; then
         USER_NAME=${SUDO_USER:=$USER}
         USER_ID=$(id -u $USER_NAME)
diff --git a/share/docker/DockerfileLocal b/share/docker/DockerfileLocal
new file mode 100644
index 0000000..7775a6b
--- /dev/null
+++ b/share/docker/DockerfileLocal
@@ -0,0 +1,36 @@
+# 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.
+
+# Dockerfile for installing the necessary dependencies for building Avro.
+# See BUILD.txt.
+FROM avro-build-ci
+
+# Install Forrest in /usr/local/apache-forrest
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua?action=download&filename=/forrest/apache-forrest-0.9-sources.tar.gz" | tar -xzf - -C /usr/local/ && \
+    curl -L -s "https://www.apache.org/dyn/closer.lua?action=download&filename=/forrest/apache-forrest-0.9-dependencies.tar.gz" | tar -xzf - -C /usr/local/ && \
+    mv /usr/local/apache-forrest-0.9 /usr/local/apache-forrest && \
+    cd /usr/local/apache-forrest/main && \
+    ./build.sh
+
+# The solution for https://issues.apache.org/jira/browse/PIG-3906
+# Configure where forrest can be found
+RUN mkdir -p /usr/local/apache-forrest/plugins       && chmod a+rwX -R /usr/local/apache-forrest/plugins && \
+    mkdir -p /usr/local/apache-forrest/build/plugins && chmod a+rwX -R /usr/local/apache-forrest/build/plugins && \
+    echo 'forrest.home=/usr/local/apache-forrest' > build.properties
+
+ENV FORREST_HOME /usr/local/apache-forrest
+
+CMD ["/bin/bash", "-i"]