diff --git a/CHANGELOG.md b/CHANGELOG.md index 2897fdb86..6460f0b65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- spark-k8s: reduce docker image size by removing the recursive chown/chmods in the final image ([#1042]). + +[#1042]: https://github.com/stackabletech/docker-images/pull/1042 + ## [25.3.0] - 2025-03-21 ### Added diff --git a/spark-k8s/Dockerfile b/spark-k8s/Dockerfile index 0ca95319d..a53a6d46b 100644 --- a/spark-k8s/Dockerfile +++ b/spark-k8s/Dockerfile @@ -157,7 +157,7 @@ EOF # spark-builder: Build Spark into /stackable/spark-${PRODUCT}/dist, -# download additional JARs and perform checks, like log4shell check. +# download additional JARs and perform checks FROM stackable/image/java-devel AS spark-builder ARG PRODUCT @@ -189,20 +189,15 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=spark-source-builder \ # 134.0 [ERROR] Detected Maven Version: 3.6.3 is not in the allowed range [3.8.8,) RUN export MAVEN_OPTS="-Xss64m -Xmx2g -XX:ReservedCodeCacheSize=1g" \ && ./dev/make-distribution.sh \ - -Dhadoop.version="$HADOOP" \ - -Dmaven.test.skip=true \ - -DskipTests \ - -P'hadoop-3' -Pkubernetes -Phive -Phive-thriftserver \ - --no-transfer-progress \ - --batch-mode + -Dhadoop.version="$HADOOP" \ + -Dmaven.test.skip=true \ + -DskipTests \ + -P'hadoop-3' -Pkubernetes -Phive -Phive-thriftserver \ + --no-transfer-progress \ + --batch-mode # <<< Build spark -# Get the correct `tini` binary for our architecture. -RUN curl -o /usr/bin/tini "https://repo.stackable.tech/repository/packages/tini/tini-${TINI}-${TARGETARCH}" \ - && chmod +x /usr/bin/tini - -# We download these under dist so that log4shell checks them WORKDIR /stackable/spark-${PRODUCT}/dist/jars # Copy modules required for s3a:// @@ -242,34 +237,31 @@ COPY --from=hbase-builder --chown=${STACKABLE_USER_UID}:0 \ WORKDIR /stackable/spark-${PRODUCT}/dist/extra-jars +COPY spark-k8s/stackable/jmx /stackable/jmx + +RUN <