| # 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 ranger-base:latest |
| |
| ARG HBASE_VERSION |
| ARG RANGER_VERSION |
| |
| |
| COPY ./dist/version /home/ranger/dist/ |
| COPY ./dist/ranger-${RANGER_VERSION}-hbase-plugin.tar.gz /home/ranger/dist/ |
| COPY ./downloads/hbase-${HBASE_VERSION}-bin.tar.gz /home/ranger/dist/ |
| |
| COPY ./scripts/ranger-hbase-setup.sh /home/ranger/scripts/ |
| COPY ./scripts/ranger-hbase.sh /home/ranger/scripts/ |
| COPY ./scripts/ranger-hbase-plugin-install.properties /home/ranger/scripts/ |
| COPY ./scripts/hbase-site.xml /home/ranger/scripts/ |
| |
| RUN tar xvfz /home/ranger/dist/hbase-${HBASE_VERSION}-bin.tar.gz --directory=/opt/ && \ |
| ln -s /opt/hbase-${HBASE_VERSION} /opt/hbase && \ |
| rm -f /home/ranger/dist/hbase-${HBASE_VERSION}-bin.tar.gz && \ |
| tar xvfz /home/ranger/dist/ranger-${RANGER_VERSION}-hbase-plugin.tar.gz --directory=/opt/ranger && \ |
| ln -s /opt/ranger/ranger-${RANGER_VERSION}-hbase-plugin /opt/ranger/ranger-hbase-plugin && \ |
| rm -f /home/ranger/dist/ranger-${RANGER_VERSION}-hbase-plugin.tar.gz && \ |
| cp -f /home/ranger/scripts/ranger-hbase-plugin-install.properties /opt/ranger/ranger-hbase-plugin/install.properties && \ |
| chmod 744 ${RANGER_SCRIPTS}/ranger-hbase-setup.sh ${RANGER_SCRIPTS}/ranger-hbase.sh |
| |
| ENV HBASE_HOME /opt/hbase |
| ENV PATH /usr/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/hbase/bin |
| |
| ENTRYPOINT [ "/home/ranger/scripts/ranger-hbase.sh" ] |