blob: 23b637f3ee15b922766551e8f7e2c5ef4eb2a7f3 [file] [log] [blame]
# 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 atlas-base:latest
ARG HIVE_VERSION
ARG HIVE_HADOOP_VERSION
ARG ATLAS_VERSION
COPY ./dist/apache-atlas-${ATLAS_VERSION}-hive-hook.tar.gz /home/atlas/dist/
COPY ./downloads/apache-hive-${HIVE_VERSION}-bin.tar.gz /home/atlas/dist/
COPY ./downloads/hadoop-${HIVE_HADOOP_VERSION}.tar.gz /home/atlas/dist/
COPY ./scripts/atlas-hive-setup.sh /home/atlas/scripts/
COPY ./scripts/atlas-hive.sh /home/atlas/scripts/
COPY ./scripts/atlas-hive-application.properties /home/atlas/scripts/
COPY ./scripts/hive-site.xml /home/atlas/scripts/
RUN tar xvfz /home/atlas/dist/apache-hive-${HIVE_VERSION}-bin.tar.gz --directory=/opt/ && \
ln -s /opt/apache-hive-${HIVE_VERSION}-bin /opt/hive && \
rm -f /home/atlas/dist/apache-hive-${HIVE_VERSION}-bin.tar.gz && \
tar xvfz /home/atlas/dist/hadoop-${HIVE_HADOOP_VERSION}.tar.gz --directory=/opt/ && \
ln -s /opt/hadoop-${HIVE_HADOOP_VERSION} /opt/hadoop && \
rm -f /home/atlas/dist/hadoop-${HIVE_HADOOP_VERSION}.tar.gz && \
tar xvfz /home/atlas/dist/apache-atlas-${ATLAS_VERSION}-hive-hook.tar.gz --directory=/opt/ && \
ln -s /opt/apache-atlas-hive-hook-${ATLAS_VERSION} /opt/apache-atlas-hive-hook && \
rm -f /home/atlas/dist/apache-atlas-${ATLAS_VERSION}-hive-hook.tar.gz && \
ln -s /opt/apache-atlas-hive-hook/hook/hive/atlas-plugin-classloader-${ATLAS_VERSION}.jar /opt/hive/lib/ && \
ln -s /opt/apache-atlas-hive-hook/hook/hive/hive-bridge-shim-${ATLAS_VERSION}.jar /opt/hive/lib/ && \
ln -s /opt/apache-atlas-hive-hook/hook/hive/atlas-hive-plugin-impl /opt/hive/lib/atlas-hive-plugin-impl && \
cp -f /home/atlas/scripts/hive-site.xml /opt/hive/conf/hive-site.xml && \
cp -f /home/atlas/scripts/atlas-hive-application.properties /opt/hive/conf/atlas-application.properties
ENV HIVE_HOME /opt/hive
ENV HADOOP_HOME /opt/hadoop
ENV PATH /usr/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/hive/bin:/opt/hadoop/bin
ENTRYPOINT [ "/home/atlas/scripts/atlas-hive.sh" ]