You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ab...@apache.org on 2025/07/10 00:27:20 UTC
(ranger-tools) branch ubi_review created (now 0171c39)
This is an automated email from the ASF dual-hosted git repository.
abhi pushed a change to branch ubi_review
in repository https://gitbox.apache.org/repos/asf/ranger-tools.git
at 0171c39 RANGER-5244: Add UBI base image with CI enabled in ubi branch
This branch includes the following new commits:
new 0171c39 RANGER-5244: Add UBI base image with CI enabled in ubi branch
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(ranger-tools) 01/01: RANGER-5244: Add UBI base image with CI enabled in ubi branch
Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
abhi pushed a commit to branch ubi_review
in repository https://gitbox.apache.org/repos/asf/ranger-tools.git
commit 0171c39b307e856ed4d4403887f46f1e4841f682
Author: Abhishek Kumar <ab...@apache.org>
AuthorDate: Wed Jul 9 17:26:43 2025 -0700
RANGER-5244: Add UBI base image with CI enabled in ubi branch
---
docker/Dockerfile | 47 ++++++++++++++++++++++++++++++++---------------
docker/build.sh | 2 +-
docker/requirements.txt | 2 ++
3 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 6ba1a83..5995ddb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -14,29 +14,44 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# see https://hub.docker.com/_/eclipse-temurin/tags
-ARG RANGER_BASE_JAVA_VERSION=8
+# see https://hub.docker.com/r/redhat/ubi9-minimal/tags
+ARG UBI_VERSION=latest
+FROM redhat/ubi9-minimal:${UBI_VERSION}
-# Ubuntu 22.04 LTS
-FROM eclipse-temurin:${RANGER_BASE_JAVA_VERSION}-jdk-jammy
+ARG RANGER_BASE_JAVA_VERSION=1.8.0
+RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
+ install -y java-${RANGER_BASE_JAVA_VERSION}-openjdk-devel \
+ && microdnf clean all \
+ && rpm -q java-${RANGER_BASE_JAVA_VERSION}-openjdk-devel
+ENV JAVA_HOME="/usr/lib/jvm/java-${RANGER_BASE_JAVA_VERSION}" \
+ JAVA_VENDOR="openjdk" \
+ JAVA_VERSION="${RANGER_BASE_JAVA_VERSION}" \
+ JBOSS_CONTAINER_OPENJDK_JDK_MODULE="/opt/jboss/container/openjdk/jdk"
+
+COPY ./requirements.txt /tmp
# Install packages
-RUN apt update -q \
- && DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
- bc \
- iputils-ping \
- pdsh \
+RUN microdnf install -y \
python3 \
python3-pip \
- python-is-python3 \
- ssh \
- tzdata \
+ bc \
+ iputils \
+ hostname \
+ tar \
+ gzip \
+ procps \
vim \
- xmlstarlet \
- && apt clean
+ shadow-utils \
+ util-linux-user \
+ sudo \
+ initscripts \
+ openssh-clients \
+ openssh-server \
+ wget \
+ && microdnf clean all
# Install Python modules
-RUN pip install apache-ranger requests \
+RUN pip install --no-cache-dir -r /tmp/requirements.txt apache-ranger requests \
&& rm -rf ~/.cache/pip
# Set environment variables
@@ -45,6 +60,8 @@ ENV RANGER_SCRIPTS=/home/ranger/scripts
ENV RANGER_HOME=/opt/ranger
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+RUN sed -i 's/^HOME_MODE.*/HOME_MODE 0755/' /etc/login.defs
+
# setup groups, users, directories
RUN groupadd ranger \
&& for u in ranger rangeradmin rangerusersync rangertagsync rangerkms; do \
diff --git a/docker/build.sh b/docker/build.sh
index 51890e8..53e13ed 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -21,4 +21,4 @@ set -u -o pipefail
docker build \
--build-arg RANGER_BASE_JAVA_VERSION \
-t apache/ranger-base:dev \
- "$@" - < Dockerfile
+ "$@" .
diff --git a/docker/requirements.txt b/docker/requirements.txt
new file mode 100644
index 0000000..863807b
--- /dev/null
+++ b/docker/requirements.txt
@@ -0,0 +1,2 @@
+apache-ranger == 0.0.12
+requests == 2.32.4
\ No newline at end of file