@@ -333,17 +333,31 @@ ln -s /usr/bin/pip-${PYTHON} /usr/bin/pip
333
333
# Symlink example jar, so that we can easily use it in tests
334
334
ln -s /stackable/spark/examples/jars/spark-examples_*.jar /stackable/spark/examples/jars/spark-examples.jar
335
335
chown -h ${STACKABLE_USER_UID}:0 /stackable/spark/examples/jars/spark-examples.jar
336
+
337
+ # fix permissions
338
+ chmod g=u /stackable/spark
339
+ chmod g=u /stackable/jmx
340
+ chmod g=u /stackable/run-spark.sh
336
341
EOF
337
342
343
+ # ----------------------------------------
344
+ # Checks
345
+ # This section is to run final checks to ensure the created final images
346
+ # adhere to several minimal requirements like:
347
+ # - check file permissions and ownerships
348
+ # ----------------------------------------
349
+
350
+ # Check that permissions and ownership in /stackable are set correctly
351
+ # This will fail and stop the build if any mismatches are found.
352
+ RUN <<EOF
353
+ /bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
354
+ EOF
338
355
339
356
# ----------------------------------------
340
- # Attention:
341
- # If you do any file based actions (copying / creating etc.) below this comment you
342
- # absolutely need to make sure that the correct permissions are applied!
343
- # chown ${STACKABLE_USER_UID}:0
357
+ # Attention: Do not perform any file based actions (copying/creating etc.) below this comment because the permissions would not be checked.
344
358
# ----------------------------------------
345
359
346
360
USER ${STACKABLE_USER_UID}
347
361
348
- WORKDIR /stackable/spark
362
+ WORKDIR ${SPARK_HOME}
349
363
ENTRYPOINT [ "/stackable/run-spark.sh" ]
0 commit comments