Skip to content

Conversation

@janhoy
Copy link

@janhoy janhoy commented Jun 28, 2023

Change log description

Makes Zookeeper container run as user zookeeper instead of as 'root'

Purpose of the change

Fixes #538

What the code does

Changes user in Dockerfile

How to verify it

Build the image and run Zookeeper. Verify that it runs as user zookeeper.

TODO: The zookeeper POD needs fsGroup: 1000 for this to work, so the mounted data PVC with be owned by the zookeeper group.

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.12%. Comparing base (9d283c2) to head (137ed8f).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #561   +/-   ##
=======================================
  Coverage   85.12%   85.12%           
=======================================
  Files          12       12           
  Lines        1613     1613           
=======================================
  Hits         1373     1373           
  Misses        155      155           
  Partials       85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


RUN apt-get -q update && \
chmod +x /usr/local/bin/* && \
chown zookeeper:zookeeper /usr/local/bin/* /opt/libs/* && \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidating all commands in the same RUN will save one Docker layer. While it would probably work to keep these files owned by root it is clearer to let the user own them, as is the case for all files in the upstream image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The pravega zookeeper docker image run as root by default

1 participant