|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +# ORC compile for Debian 11 |
| 18 | +# |
| 19 | + |
| 20 | +FROM debian:bullseye |
| 21 | +LABEL maintainer= "Apache ORC project <[email protected]>" |
| 22 | +ARG jdk=8 |
| 23 | + |
| 24 | +RUN apt-get update |
| 25 | +RUN apt-get install -y \ |
| 26 | + cmake \ |
| 27 | + gcc \ |
| 28 | + g++ \ |
| 29 | + git \ |
| 30 | + libsasl2-dev \ |
| 31 | + libssl-dev \ |
| 32 | + make \ |
| 33 | + curl \ |
| 34 | + maven; \ |
| 35 | + if [ "${jdk}" = "8" ] ; then \ |
| 36 | + apt-get install -y \ |
| 37 | + gnupg2 \ |
| 38 | + software-properties-common \ |
| 39 | + wget; \ |
| 40 | + wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -; \ |
| 41 | + add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \ |
| 42 | + apt-get update && \ |
| 43 | + apt-get install -y adoptopenjdk-8-hotspot && \ |
| 44 | + update-alternatives --set java /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java && \ |
| 45 | + update-alternatives --set javac /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/javac; \ |
| 46 | + else \ |
| 47 | + apt-get install -y openjdk-11-jdk; \ |
| 48 | + fi |
| 49 | + |
| 50 | +WORKDIR /root |
| 51 | + |
| 52 | +VOLUME /root/.m2/repository |
| 53 | + |
| 54 | +CMD if [ ! -d orc ]; then \ |
| 55 | + echo "No volume provided, building from apache main."; \ |
| 56 | + echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \ |
| 57 | + git clone https://github.com/apache/orc.git -b main; \ |
| 58 | + fi && \ |
| 59 | + mkdir build && \ |
| 60 | + cd build && \ |
| 61 | + cmake ../orc && \ |
| 62 | + make package test-out |
0 commit comments