@@ -191,7 +191,10 @@ FROM stackable/image/java-base AS final
191
191
192
192
ARG PRODUCT
193
193
ARG RELEASE
194
+ ARG TARGETARCH
195
+ ARG TARGETOS
194
196
ARG HDFS_UTILS
197
+ ARG ASYNC_PROFILER
195
198
ARG STACKABLE_USER_UID
196
199
197
200
LABEL \
@@ -203,7 +206,13 @@ LABEL \
203
206
summary="The Stackable image for Apache Hadoop." \
204
207
description="This image is deployed by the Stackable Operator for Apache Hadoop / HDFS."
205
208
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
+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/async-profiler-${ASYNC_PROFILER}-* /stackable/async-profiler-${ASYNC_PROFILER}
213
+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/jmx /stackable/jmx
214
+ COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/protobuf-*-src.tar.gz /stackable/
215
+
207
216
COPY --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
208
217
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz /stackable
209
218
@@ -230,7 +239,20 @@ rm -rf /var/cache/yum
230
239
# Without this fuse_dfs does not work
231
240
# It is so non-root users (as we are) can mount a FUSE device and let other users access it
232
241
echo "user_allow_other" > /etc/fuse.conf
233
- EOF
242
+
243
+ ln -s "/stackable/hadoop-${PRODUCT}-stackable${RELEASE}" /stackable/hadoop
244
+ chown --no-dereference "${STACKABLE_USER_UID}:0" /stackable/hadoop
245
+ chmod g=u "/stackable/hadoop-${PRODUCT}-stackable${RELEASE}"
246
+ chmod g=u /stackable/*-src.tar.gz
247
+
248
+ ARCH="${TARGETARCH/amd64/x64}"
249
+ mv /stackable/async-profiler-${ASYNC_PROFILER}* "/stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}"
250
+ chmod g=u "/stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}"
251
+ ln -s "/stackable/async-profiler-${ASYNC_PROFILER}-${TARGETOS}-${ARCH}" /stackable/async-profiler
252
+ chown --no-dereference "${STACKABLE_USER_UID}:0" /stackable/async-profiler
253
+
254
+ chmod g=u /stackable/jmx
255
+
234
256
235
257
# ----------------------------------------
236
258
# Checks
241
263
242
264
# Check that permissions and ownership in /stackable are set correctly
243
265
# This will fail and stop the build if any mismatches are found.
244
- RUN <<EOF
245
266
/bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
246
267
EOF
247
268
0 commit comments