@@ -191,7 +191,10 @@ FROM stackable/image/java-base AS final
191191
192192ARG PRODUCT
193193ARG RELEASE
194+ ARG TARGETARCH
195+ ARG TARGETOS
194196ARG HDFS_UTILS
197+ ARG ASYNC_PROFILER
195198ARG STACKABLE_USER_UID
196199
197200LABEL \
@@ -203,7 +206,14 @@ LABEL \
203206 summary="The Stackable image for Apache Hadoop." \
204207 description="This image is deployed by the Stackable Operator for Apache Hadoop / HDFS."
205208
206- COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable /stackable
209+
210+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/hadoop-${PRODUCT}-stackable${RELEASE} /stackable/hadoop-${PRODUCT}-stackable${RELEASE}
211+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/hadoop-${PRODUCT}-stackable${RELEASE}-src.tar.gz /stackable/
212+ # TODO ARCH & symlink
213+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/async-profiler-${ASYNC_PROFILER}-* /stackable/async-profiler-${ASYNC_PROFILER}
214+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/jmx /stackable/jmx
215+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/protobuf-*-src.tar.gz /stackable/
216+
207217COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}.jar /stackable/hadoop-${PRODUCT}-stackable${RELEASE}/share/hadoop/common/lib/hdfs-utils-${HDFS_UTILS}.jar
208218COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz /stackable
209219
@@ -230,7 +240,14 @@ rm -rf /var/cache/yum
230240# Without this fuse_dfs does not work
231241# It is so non-root users (as we are) can mount a FUSE device and let other users access it
232242echo "user_allow_other" > /etc/fuse.conf
233- EOF
243+
244+ ln -s /stackable/hadoop-${PRODUCT}-stackable${RELEASE} /stackable/hadoop
245+ chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/hadoop
246+
247+ ARCH="${TARGETARCH/amd64/x64}"
248+ mv /stackable/async-profiler-${ASYNC_PROFILER}* /stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}
249+ ln -s "/stackable/async-profiler-${ASYNC_PROFILER}-${TARGETOS}-${ARCH}" /stackable/async-profiler
250+ chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/async-profiler
234251
235252# ----------------------------------------
236253# Checks
0 commit comments