Skip to content

Commit 75d8ed5

Browse files
committed
move check-permissions-ownership.sh to stackable-base image /bin
1 parent 4f1caa4 commit 75d8ed5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

nifi/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bc
100100
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
101101
COPY --chown=${STACKABLE_USER_UID}:0 nifi/licenses /licenses
102102
COPY --chown=${STACKABLE_USER_UID}:0 nifi/python /stackable/python
103-
COPY --chown=${STACKABLE_USER_UID}:0 shared/checks/check-permissions-ownership /tmp/check-permissions-ownership
104103

105104
RUN <<EOF
106105
microdnf update
@@ -141,8 +140,7 @@ EOF
141140
# Check that permissions and ownership in /stackable are set correctly
142141
# This will fail and stop the build if any mismatches are found.
143142
RUN <<EOF
144-
/tmp/check-permissions-ownership /stackable ${STACKABLE_USER_UID} 0
145-
rm /tmp/check-permissions-ownership
143+
/bin/check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
146144
EOF
147145

148146
# ----------------------------------------

shared/checks/check-permissions-ownership renamed to shared/checks/check-permissions-ownership.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#
1212
# Usage
1313
#
14-
# ./check-permissions-ownership <directory> <uid> <gid>
15-
# ./check-permissions-ownership /stackable ${STACKABLE_USER_UID} 0
14+
# ./check-permissions-ownership.sh <directory> <uid> <gid>
15+
# ./check-permissions-ownership.sh /stackable ${STACKABLE_USER_UID} 0
1616
#
1717

1818
if [[ $# -ne 3 ]]; then

stackable-base/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ COPY --from=config-utils --chown=${STACKABLE_USER_UID}:0 /config-utils/config-ut
204204
# Debug tool that logs generic system information.
205205
COPY --from=containerdebug --chown=${STACKABLE_USER_UID}:0 /containerdebug/target/release/containerdebug /stackable/containerdebug
206206

207+
# **check-permissions-ownership.sh**
208+
# Bash script to check proper permissions and ownership requirements in the final Stackable images
209+
COPY --chown=${STACKABLE_USER_UID}:0 shared/checks/check-permissions-ownership.sh /bin/check-permissions-ownership.sh
210+
207211
ENV PATH="${PATH}:/stackable"
208212

209213
# These labels have mostly been superceded by the OpenContainer spec annotations below but it doesn't hurt to include them

0 commit comments

Comments
 (0)