diff --git a/Dockerfile b/Dockerfile index cca1cc8..9341425 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,67 +14,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.17.8-buster AS go -RUN go install github.com/rexray/gocsi/csc@latest - FROM rockylinux:9.3 RUN set -eux ; \ dnf install -y \ bzip2 \ - diffutils \ findutils \ - fuse \ - jq \ + java-21-openjdk-headless \ krb5-workstation \ libxcrypt-compat \ - lsof \ ncurses \ - net-tools \ - nmap-ncat \ openssl \ procps \ - python3 python3-pip \ snappy \ sudo \ unzip \ zlib \ - && dnf clean all \ - && ln -sf /usr/bin/python3 /usr/bin/python -RUN sudo python3 -m pip install --upgrade pip - -# CSI / k8s / fuse / goofys dependency -COPY --from=go /go/bin/csc /usr/bin/csc -# S3 FUSE support - mountpoint-s3 -ARG MOUNTPOINT_S3_VERSION=1.19.0 -RUN set -eux ; \ - ARCH="$(arch)"; \ - case "${ARCH}" in \ - x86_64) arch='x86_64' ;; \ - aarch64) arch='arm64' ;; \ - *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ - esac; \ - curl -L "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/${arch}/mount-s3-${MOUNTPOINT_S3_VERSION}-${arch}.rpm" -o mount-s3.rpm ; \ - dnf install -y mount-s3.rpm ; \ - rm -f mount-s3.rpm + && dnf clean all -# Install rclone for smoketest -ARG RCLONE_VERSION=1.69.3 -RUN set -eux ; \ - ARCH="$(arch)" ; \ - case "${ARCH}" in \ - x86_64) arch='amd64' ;; \ - aarch64) arch='arm64' ;; \ - *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ - esac; \ - curl -L -o /tmp/package.rpm "https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-${arch}.rpm"; \ - dnf install -y /tmp/package.rpm; \ - rm -f /tmp/package.rpm - - -#For executing inline smoketest -RUN set -eux ; \ - pip3 install awscli==1.38.15 robotframework==6.1.1 boto3==1.37.15 ; \ - rm -r ~/.cache/pip #dumb init for proper init handling RUN set -eux ; \ @@ -95,30 +51,6 @@ RUN set -eux ; \ chmod +x dumb-init ; \ mv dumb-init /usr/local/bin/dumb-init -#byteman test for development -ARG BYTEMAN_VERSION=4.0.25 -ENV BYTEMAN_HOME=/opt/byteman -RUN cd /tmp && \ - curl -L -o byteman.zip https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/byteman-download-${BYTEMAN_VERSION}-bin.zip && \ - unzip -j -d byteman byteman.zip && \ - sudo mkdir -p ${BYTEMAN_HOME}/lib && \ - sudo mv byteman/byteman.jar byteman/byteman-submit.jar ${BYTEMAN_HOME}/lib/ && \ - sudo mv byteman/bmsubmit.sh /usr/local/bin/bmsubmit && \ - sudo chmod +x /usr/local/bin/bmsubmit && \ - sudo rm -rf byteman.zip byteman && \ - sudo chmod -R a+rX ${BYTEMAN_HOME} && \ - sudo ln -s ${BYTEMAN_HOME}/lib/byteman.jar /opt/byteman.jar - -#async profiler for development profiling -RUN set -eux ; \ - ARCH="$(arch)" ; \ - case "${ARCH}" in \ - x86_64) url='https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-x64.tar.gz' ;; \ - aarch64) url='https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-arm64.tar.gz' ;; \ - *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ - esac; \ - curl -L ${url} | tar xvz ; \ - mv async-profiler-* /opt/profiler # Hadoop native libary (Hadoop 3.4.1 doesn't have aarch64 binary) RUN set -eux ; \ @@ -135,33 +67,12 @@ RUN set -eux ; \ rm -rf /tmp/hadoop-${hadoop_version} && \ rm -f hadoop-${hadoop_version}.tar.gz -# OpenJDK 21 -RUN set -eux ; \ - ARCH="$(arch)"; \ - case "${ARCH}" in \ - x86_64) \ - url='https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz'; \ - sha256='a2def047a73941e01a73739f92755f86b895811afb1f91243db214cff5bdac3f'; \ - ;; \ - aarch64) \ - url='https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz'; \ - sha256='08db1392a48d4eb5ea5315cf8f18b89dbaf36cda663ba882cf03c704c9257ec2'; \ - ;; \ - *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ - esac && \ - curl -L ${url} -o openjdk.tar.gz && \ - echo "${sha256} *openjdk.tar.gz" | sha256sum -c - && \ - tar xzvf openjdk.tar.gz -C /usr/local && \ - rm -f openjdk.tar.gz - -ENV JAVA_HOME=/usr/local/jdk-21.0.2 -# compatibility with Ozone 1.4.0 and earlier compose env. -RUN mkdir -p /usr/lib/jvm && ln -s $JAVA_HOME /usr/lib/jvm/jre +ENV JAVA_HOME=/usr/lib/jvm/jre-21-openjdk ENV PATH=/opt/hadoop/libexec:$PATH:$JAVA_HOME/bin:/opt/hadoop/bin RUN id=1000; \ - for u in hadoop om dn scm s3g recon testuser testuser2 httpfs; do \ + for u in hadoop om dn scm s3g recon httpfs; do \ groupadd --gid $id $u \ && useradd --uid $id $u --gid $id --home /opt/$u \ && mkdir /opt/$u \