ORC-39. Create docker scripts for building and testing in various
Linux distributions. (omalley reviewed by asandryh)

Signed-off-by: Owen O'Malley <omalley@apache.org>

Fixes apache/orc#17
diff --git a/docker/README b/docker/README
new file mode 100644
index 0000000..461c827
--- /dev/null
+++ b/docker/README
@@ -0,0 +1,10 @@
+These scripts are useful for testing on different versions of Linux
+assuming that you are running a version of Linux that has docker
+available.
+
+To test with multiple versions, run the run-all.sh script.
+
+To run the docker scripts:
+1. cd $os
+2. docker build -t orc-$os .
+3. docker run orc-$os
diff --git a/docker/centos5/Dockerfile b/docker/centos5/Dockerfile
new file mode 100644
index 0000000..8b4667f
--- /dev/null
+++ b/docker/centos5/Dockerfile
@@ -0,0 +1,46 @@
+# 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.
+
+# ORC compile for CentOS 5
+#
+
+FROM centos:5
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN yum check-update || true
+RUN yum install -y \
+  cmake \
+  curl-devel \
+  expat-devel \
+  gcc \
+  gcc-c++ \
+  gettext-devel \
+  make \
+  openssl-devel \
+  wget \
+  zlib-devel
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+RUN wget https://github.com/git/git/archive/v2.7.0.tar.gz -O git.tgz
+RUN tar xzf git.tgz
+RUN cd git-2.7.0 && make prefix=/usr all install
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out
diff --git a/docker/centos6/Dockerfile b/docker/centos6/Dockerfile
new file mode 100644
index 0000000..043b7e8
--- /dev/null
+++ b/docker/centos6/Dockerfile
@@ -0,0 +1,43 @@
+# 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.
+
+# ORC compile for CentOS 6
+#
+
+FROM centos:6
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN yum check-update || true
+RUN yum install -y \
+  cmake \
+  curl-devel \
+  expat-devel \
+  gcc \
+  gcc-c++ \
+  gettext-devel \
+  git \
+  make \
+  openssl-devel \
+  zlib-devel
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out
diff --git a/docker/centos7/Dockerfile b/docker/centos7/Dockerfile
new file mode 100644
index 0000000..f5ede0e
--- /dev/null
+++ b/docker/centos7/Dockerfile
@@ -0,0 +1,43 @@
+# 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.
+
+# ORC compile for CentOS 7
+#
+
+FROM centos:7
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN yum check-update || true
+RUN yum install -y \
+  cmake \
+  curl-devel \
+  expat-devel \
+  gcc \
+  gcc-c++ \
+  gettext-devel \
+  git \
+  make \
+  openssl-devel \
+  zlib-devel
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out
diff --git a/docker/debian6/Dockerfile b/docker/debian6/Dockerfile
new file mode 100644
index 0000000..ded7bd0
--- /dev/null
+++ b/docker/debian6/Dockerfile
@@ -0,0 +1,38 @@
+# 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.
+
+# ORC compile for Debian 6
+#
+
+FROM debian:6
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN apt-get update
+RUN apt-get install -y \
+  cmake \
+  gcc \
+  g++ \
+  git \
+  make
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out
diff --git a/docker/debian7/Dockerfile b/docker/debian7/Dockerfile
new file mode 100644
index 0000000..ef0e146
--- /dev/null
+++ b/docker/debian7/Dockerfile
@@ -0,0 +1,38 @@
+# 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.
+
+# ORC compile for Debian 7
+#
+
+FROM debian:7
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN apt-get update
+RUN apt-get install -y \
+  cmake \
+  gcc \
+  g++ \
+  git \
+  make
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out
diff --git a/docker/run-all.sh b/docker/run-all.sh
new file mode 100755
index 0000000..0a34b9c
--- /dev/null
+++ b/docker/run-all.sh
@@ -0,0 +1,25 @@
+#!/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.
+
+start=`date`
+for os in centos5 centos6 centos7 debian6 debian7 ubuntu12 ubuntu14; do
+  echo "Testing $os"
+  ( cd $os && docker build -t "orc-$os" . )
+  docker run "orc-$os" || exit 1
+done
+echo "Start: $start"
+echo "End:" `date`
\ No newline at end of file
diff --git a/docker/ubuntu12/Dockerfile b/docker/ubuntu12/Dockerfile
new file mode 100644
index 0000000..ca3c430
--- /dev/null
+++ b/docker/ubuntu12/Dockerfile
@@ -0,0 +1,38 @@
+# 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.
+
+# ORC compile for Ubuntu 12
+#
+
+FROM ubuntu:12.04
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN apt-get update
+RUN apt-get install -y \
+  cmake \
+  gcc \
+  g++ \
+  git \
+  make
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out
diff --git a/docker/ubuntu14/Dockerfile b/docker/ubuntu14/Dockerfile
new file mode 100644
index 0000000..d789a71
--- /dev/null
+++ b/docker/ubuntu14/Dockerfile
@@ -0,0 +1,38 @@
+# 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.
+
+# ORC compile for Ubuntu 14
+#
+
+FROM ubuntu:14.04
+MAINTAINER Owen O'Malley <owen@hortonworks.com>
+
+RUN apt-get update
+RUN apt-get install -y \
+  cmake \
+  gcc \
+  g++ \
+  git \
+  make
+
+ENV TZ=America/Los_Angeles
+WORKDIR /root
+
+CMD git clone https://github.com/apache/orc.git -b master && \
+  mkdir orc/build && \
+  cd orc/build && \
+  cmake .. && \ 
+  make package test-out