| # 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. |
| |
| ARG RANGER_BASE_IMAGE=apache/ranger-base |
| ARG RANGER_BASE_VERSION=20260123-2-8 |
| |
| FROM ${RANGER_BASE_IMAGE}:${RANGER_BASE_VERSION} |
| |
| ARG PDP_VERSION |
| |
| COPY ./dist/ranger-${PDP_VERSION}-pdp.tar.gz /home/ranger/dist/ |
| COPY ./scripts/pdp/ranger-pdp.sh ${RANGER_SCRIPTS}/ |
| |
| RUN tar xvfz /home/ranger/dist/ranger-${PDP_VERSION}-pdp.tar.gz --directory=${RANGER_HOME} \ |
| && ln -s ${RANGER_HOME}/ranger-${PDP_VERSION}-pdp ${RANGER_HOME}/pdp \ |
| && rm -f /home/ranger/dist/ranger-${PDP_VERSION}-pdp.tar.gz \ |
| && mkdir -p /var/log/ranger/pdp /var/run/ranger /etc/ranger/cache \ |
| && ln -s ${RANGER_HOME}/pdp/ranger-pdp-services.sh /usr/bin/ranger-pdp-services.sh \ |
| && chown -R ranger:ranger ${RANGER_HOME}/pdp/ ${RANGER_SCRIPTS}/ /var/log/ranger/ /var/run/ranger /etc/ranger/ \ |
| && chmod 744 ${RANGER_SCRIPTS}/ranger-pdp.sh |
| |
| USER ranger |
| ENTRYPOINT [ "/home/ranger/scripts/ranger-pdp.sh" ] |