@@ -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,14 @@ 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
+ # 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
+
207
217
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
218
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz /stackable
209
219
@@ -230,7 +240,20 @@ rm -rf /var/cache/yum
230
240
# Without this fuse_dfs does not work
231
241
# It is so non-root users (as we are) can mount a FUSE device and let other users access it
232
242
echo "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
+ chmod g=u "/stackable/hadoop-${PRODUCT}-stackable${RELEASE}"
247
+ chmod g=u /stackable/*-src.tar.gz
248
+
249
+ ARCH="${TARGETARCH/amd64/x64}"
250
+ mv /stackable/async-profiler-${ASYNC_PROFILER}* "/stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}"
251
+ chmod g=u "/stackable/async-profiler-${ASYNC_PROFILER-}-${TARGETOS}-${ARCH}"
252
+ ln -s "/stackable/async-profiler-${ASYNC_PROFILER}-${TARGETOS}-${ARCH}" /stackable/async-profiler
253
+ chown --no-dereference "${STACKABLE_USER_UID}:0" /stackable/async-profiler
254
+
255
+ chmod g=u /stackable/jmx
256
+
234
257
235
258
# ----------------------------------------
236
259
# Checks
241
264
242
265
# Check that permissions and ownership in /stackable are set correctly
243
266
# This will fail and stop the build if any mismatches are found.
244
- RUN <<EOF
245
267
/bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
246
268
EOF
247
269
0 commit comments