Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Fixed

- nifi: reduce docker image size by removing the recursive chown/chmods in the final image ([#1027]).

[#1027]: https://github.com/stackabletech/docker-images/pull/1027

## [25.3.0] - 2025-03-21

### Added
Expand Down
11 changes: 4 additions & 7 deletions nifi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ RUN curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackabl
# Remove the unzipped sources
rm -rf /stackable/nifi-${PRODUCT}-src && \
# Remove generated docs in binary
rm -rf /stackable/nifi-${PRODUCT}/docs
rm -rf /stackable/nifi-${PRODUCT}/docs && \
# Set correct groups
chmod -R g=u /stackable

FROM stackable/image/java-base AS final

Expand Down Expand Up @@ -102,15 +104,10 @@ pip install --no-cache-dir \
# For backwards compatibility we create a softlink in /bin where the jar used to be as long as we are root
# This can be removed once older versions / operators using this are no longer supported
ln -s /stackable/stackable-bcrypt.jar /bin/stackable-bcrypt.jar

# All files and folders owned by root group to support running as arbitrary users.
# This is best practice as all container users will belong to the root group (0).
chown -R ${STACKABLE_USER_UID}:0 /stackable
chmod -R g=u /stackable
EOF

# ----------------------------------------
# Attention: We are changing the group of all files in /stackable directly above
# Attention:
# If you do any file based actions (copying / creating etc.) below this comment you
# absolutely need to make sure that the correct permissions are applied!
# chown ${STACKABLE_USER_UID}:0
Expand Down