maksaska commented on code in PR #12637:
URL: https://github.com/apache/ignite/pull/12637#discussion_r3503652064


##########
modules/ducktests/tests/docker/Dockerfile:
##########
@@ -19,84 +19,126 @@ FROM $jdk_version
 MAINTAINER Apache Ignite [email protected]
 VOLUME ["/opt/ignite-dev"]
 
-# Set the timezone.
+# ---------------------------------------------------------------------
+# 1. Environment & Global System Configurations
+# ---------------------------------------------------------------------
 ENV TZ=Europe/Moscow
-RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+ENV DEBIAN_FRONTEND=noninteractive
 
-# Do not ask for confirmations when running apt-get, etc.
-ENV DEBIAN_FRONTEND noninteractive
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 
-# Set the ducker.creator label so that we know that this is a ducker image.  
This will make it
-# visible to 'ducker purge'.  The ducker.creator label also lets us know what 
UNIX user built this
-# image.
+# Set up ducker labels
 ARG ducker_creator=default
 LABEL ducker.creator=$ducker_creator
 
-# Update Linux and install necessary utilities.
+# Fix package mirror protocol from http to https
 RUN cat /etc/apt/sources.list | sed 
's/http:\/\/deb.debian.org/https:\/\/deb.debian.org/g' > 
/etc/apt/sources.list.2 && mv /etc/apt/sources.list.2 /etc/apt/sources.list
-RUN apt update && apt install -y sudo netcat-traditional iptables rsync unzip 
wget curl jq coreutils openssh-server net-tools vim python3-pip python3-dev 
python3-venv libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf 
traceroute mc git && apt-get -y clean
 
-RUN python3 -m venv /opt/venv
+# ---------------------------------------------------------------------
+# 2. System Utilities & Python 3.9 Installation
+# ---------------------------------------------------------------------
+RUN apt update && apt install -y software-properties-common gpg \
+    && add-apt-repository -y ppa:deadsnakes/ppa \
+    && apt update && apt install -y \
+    sudo \
+    netcat-traditional \
+    iptables \
+    rsync \
+    unzip \
+    wget \
+    curl \
+    jq \
+    coreutils \
+    openssh-server \
+    net-tools \
+    vim \
+    python3.9 \
+    python3.9-dev \
+    python3.9-venv \
+    python3-pip \
+    libffi-dev \
+    libssl-dev \
+    cmake \
+    pkg-config \
+    libfuse-dev \
+    iperf \
+    traceroute \
+    mc \
+    git \
+    && apt-get -y clean
+
+# ---------------------------------------------------------------------
+# 3. Python Virtual Environment Setup & Requirements
+# ---------------------------------------------------------------------
+# Enforce Python 3.9 for our internal virtual environment
+RUN python3.9 -m venv /opt/venv
 ENV PATH="/opt/venv/bin:$PATH"
+
+# Upgrade pip to suppress the notice warning and ensure faster dependency 
checks
+RUN pip install --no-cache-dir --upgrade pip
+
+# Print the active python version to the build terminal to confirm 3.9 is 
loaded
+RUN python3 --version
+
 COPY ./requirements.txt /root/requirements.txt
-RUN pip3 install -r /root/requirements.txt
+RUN pip3 install --no-cache-dir -r /root/requirements.txt
 
-# Set up ssh
+# ---------------------------------------------------------------------
+# 4. SSH & Security Settings
+# ---------------------------------------------------------------------
 COPY ./ssh-config /root/.ssh/config
-# NOTE: The paramiko library supports the PEM-format private key, but does not 
support the RFC4716 format.
 RUN ssh-keygen -m PEM -q -t rsa -N '' -f /root/.ssh/id_rsa && cp -f 
/root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
 RUN echo 'PermitUserEnvironment yes' >> /etc/ssh/sshd_config
 
+# ---------------------------------------------------------------------
+# 5. Apache Component Stack Dependencies (Ignite, Zookeeper, Kafka, JMX)
+# ---------------------------------------------------------------------
 ARG APACHE_MIRROR="https://apache-mirror.rbc.ru/pub/apache/";
 ARG APACHE_ARCHIVE="https://archive.apache.org/dist/";
 
-# Install binary test dependencies.
+# Install Ignite
 RUN for v in "2.7.6" "2.17.0"; \
     do cd /opt; \
     curl -O $APACHE_ARCHIVE/ignite/$v/apache-ignite-$v-bin.zip;\
-    unzip apache-ignite-$v-bin.zip && mv /opt/apache-ignite-$v-bin 
/opt/ignite-$v;\
-    done
+    unzip apache-ignite-$v-bin.zip && mv /opt/apache-ignite-$v-bin 
/opt/ignite-$v; \
+    done \
+    && rm /opt/apache-ignite-*-bin.zip
 
-RUN rm /opt/apache-ignite-*-bin.zip
-
-#Install zookeeper.
+# Install Zookeeper
 ARG ZOOKEEPER_VERSION="3.5.8"
 ARG ZOOKEEPER_NAME="zookeeper-$ZOOKEEPER_VERSION"
 ARG ZOOKEEPER_RELEASE_NAME="apache-$ZOOKEEPER_NAME-bin"
 ARG ZOOKEEPER_RELEASE_ARTIFACT="$ZOOKEEPER_RELEASE_NAME.tar.gz"
-RUN echo $APACHE_ARCHIVE/zookeeper/$ZOOKEEPER_NAME/$ZOOKEEPER_RELEASE_ARTIFACT
 RUN cd /opt && curl -O 
$APACHE_ARCHIVE/zookeeper/$ZOOKEEPER_NAME/$ZOOKEEPER_RELEASE_ARTIFACT \
- && tar xvf $ZOOKEEPER_RELEASE_ARTIFACT && rm $ZOOKEEPER_RELEASE_ARTIFACT
-RUN mv /opt/$ZOOKEEPER_RELEASE_NAME /opt/$ZOOKEEPER_NAME
+    && tar xvf $ZOOKEEPER_RELEASE_ARTIFACT && rm $ZOOKEEPER_RELEASE_ARTIFACT \
+    && mv /opt/$ZOOKEEPER_RELEASE_NAME /opt/$ZOOKEEPER_NAME
 
-#Install kafka
+# Install Kafka
 ARG KAFKA_VERSION="3.9.1"

Review Comment:
   Kafka is required here for running our CDC tests. Since upgrading past 3.9.1 
removes ZooKeeper and introduces major breaking changes, I’ll handle that 
version upgrade in a separate, dedicated PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to