From 32bfd66b0259deb4247eb7f660ebd5850fb55454 Mon Sep 17 00:00:00 2001 From: Soumitra Sulav Date: Tue, 24 Jun 2025 01:22:10 +0530 Subject: [PATCH 1/4] HDDS-13251. Dockerfile changes for Byteman support --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3e54320..b517d0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,8 +96,18 @@ RUN set -eux ; \ mv dumb-init /usr/local/bin/dumb-init #byteman test for development -RUN curl -Lo /opt/byteman.jar https://repo.maven.apache.org/maven2/org/jboss/byteman/byteman/4.0.23/byteman-4.0.23.jar \ - && chmod o+r /opt/byteman.jar +ARG BYTEMAN_VERSION=4.0.25 +ARG BYTEMAN_HOME=/opt/byteman/ +RUN yum install unzip curl -y && \ + curl -L -o /tmp/byteman.zip \ + https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/byteman-download-${BYTEMAN_VERSION}-bin.zip && \ + unzip /tmp/byteman.zip -d /tmp && \ + sudo mkdir -p ${BYTEMAN_HOME}/lib && \ + sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman.jar ${BYTEMAN_HOME}/lib/byteman.jar && \ + sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman-submit.jar ${BYTEMAN_HOME}/lib/byteman-submit.jar && \ + sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/bin/bmsubmit.sh /usr/local/bin/bmsubmit && \ + sudo chmod +x /usr/local/bin/bmsubmit && \ + sudo rm -rf /tmp/byteman.zip /tmp/byteman-download-${BYTEMAN_VERSION} #async profiler for development profiling RUN set -eux ; \ From d2fd9a2d59126546a521fa52a739c918eb125ee8 Mon Sep 17 00:00:00 2001 From: Soumitra Sulav Date: Tue, 24 Jun 2025 01:30:51 +0530 Subject: [PATCH 2/4] Add a symlink for /opt/byteman.jar --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b517d0e..37e7e24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -98,7 +98,7 @@ RUN set -eux ; \ #byteman test for development ARG BYTEMAN_VERSION=4.0.25 ARG BYTEMAN_HOME=/opt/byteman/ -RUN yum install unzip curl -y && \ +RUN sudo yum install unzip -y && \ curl -L -o /tmp/byteman.zip \ https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/byteman-download-${BYTEMAN_VERSION}-bin.zip && \ unzip /tmp/byteman.zip -d /tmp && \ @@ -107,7 +107,9 @@ RUN yum install unzip curl -y && \ sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman-submit.jar ${BYTEMAN_HOME}/lib/byteman-submit.jar && \ sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/bin/bmsubmit.sh /usr/local/bin/bmsubmit && \ sudo chmod +x /usr/local/bin/bmsubmit && \ - sudo rm -rf /tmp/byteman.zip /tmp/byteman-download-${BYTEMAN_VERSION} + sudo rm -rf /tmp/byteman.zip /tmp/byteman-download-${BYTEMAN_VERSION} && \ + sudo chmod o+r ${BYTEMAN_HOME}/lib/byteman.jar && \ + sudo ln -s ${BYTEMAN_HOME}/lib/byteman.jar /opt/byteman.jar #async profiler for development profiling RUN set -eux ; \ From 954d41a20785f377da109f7ec7a86ac3f66a915d Mon Sep 17 00:00:00 2001 From: Soumitra Sulav Date: Tue, 24 Jun 2025 02:01:10 +0530 Subject: [PATCH 3/4] Addressed review comments --- Dockerfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37e7e24..3d2a4b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,6 +52,7 @@ RUN set -eux ; \ snappy \ sudo \ zlib \ + unzip \ && dnf clean all \ && ln -sf /usr/bin/python3 /usr/bin/python RUN sudo python3 -m pip install --upgrade pip @@ -97,19 +98,17 @@ RUN set -eux ; \ #byteman test for development ARG BYTEMAN_VERSION=4.0.25 -ARG BYTEMAN_HOME=/opt/byteman/ -RUN sudo yum install unzip -y && \ - curl -L -o /tmp/byteman.zip \ - https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/byteman-download-${BYTEMAN_VERSION}-bin.zip && \ +ARG BYTEMAN_LIB=/opt/byteman/lib +RUN curl -L -o /tmp/byteman.zip https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/byteman-download-${BYTEMAN_VERSION}-bin.zip && \ unzip /tmp/byteman.zip -d /tmp && \ - sudo mkdir -p ${BYTEMAN_HOME}/lib && \ - sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman.jar ${BYTEMAN_HOME}/lib/byteman.jar && \ - sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman-submit.jar ${BYTEMAN_HOME}/lib/byteman-submit.jar && \ + sudo mkdir -p ${BYTEMAN_LIB} && \ + sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman.jar ${BYTEMAN_LIB}/byteman.jar && \ + sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/lib/byteman-submit.jar ${BYTEMAN_LIB}/byteman-submit.jar && \ sudo cp /tmp/byteman-download-${BYTEMAN_VERSION}/bin/bmsubmit.sh /usr/local/bin/bmsubmit && \ sudo chmod +x /usr/local/bin/bmsubmit && \ sudo rm -rf /tmp/byteman.zip /tmp/byteman-download-${BYTEMAN_VERSION} && \ - sudo chmod o+r ${BYTEMAN_HOME}/lib/byteman.jar && \ - sudo ln -s ${BYTEMAN_HOME}/lib/byteman.jar /opt/byteman.jar + sudo chmod o+r ${BYTEMAN_LIB}/byteman.jar && \ + sudo ln -s ${BYTEMAN_LIB}/byteman.jar /opt/byteman.jar #async profiler for development profiling RUN set -eux ; \ From 86ad2c3cf161292087f50255351fe22b288a05eb Mon Sep 17 00:00:00 2001 From: Soumitra Sulav Date: Tue, 24 Jun 2025 10:00:18 +0530 Subject: [PATCH 4/4] Added unzip in order --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3d2a4b7..e47f08a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,8 +51,8 @@ RUN set -eux ; \ python3 python3-pip \ snappy \ sudo \ - zlib \ unzip \ + zlib \ && dnf clean all \ && ln -sf /usr/bin/python3 /usr/bin/python RUN sudo python3 -m pip install --upgrade pip