Skip to content

Commit b32979f

Browse files
committed
add permissions check
1 parent 8e3b39c commit b32979f

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

hive/Dockerfile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if [ "${DELETE_CACHES}" = "true" ] ; then
8989
fi
9090

9191
# change groups
92-
chmod -R g=u /stackable
92+
chmod --recursive g=u /stackable
9393
EOF
9494

9595

@@ -145,12 +145,21 @@ chown -h ${STACKABLE_USER_UID}:0 /stackable/hadoop
145145
EOF
146146

147147
# ----------------------------------------
148-
# Attention:
149-
# If you do any file based actions (copying / creating etc.) below this comment you
150-
# absolutely need to make sure that the correct permissions are applied!
151-
# chown ${STACKABLE_USER_UID}:0
148+
# Checks
149+
# This section is to run final checks to ensure the created final images
150+
# adhere to several minimal requirements like:
151+
# - check file permissions and ownerships
152152
# ----------------------------------------
153153

154+
# Check that permissions and ownership in /stackable are set correctly
155+
# This will fail and stop the build if any mismatches are found.
156+
RUN <<EOF
157+
/bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
158+
EOF
159+
160+
# ----------------------------------------
161+
# Attention: Do not perform any file based actions (copying/creating etc.) below this comment because the permissions would not be checked.
162+
154163
USER ${STACKABLE_USER_UID}
155164

156165
ENV HADOOP_HOME=/stackable/hadoop

0 commit comments

Comments
 (0)