-
Notifications
You must be signed in to change notification settings - Fork 873
non-root user #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
non-root user #537
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
FROM eclipse-temurin:17.0.7_7-jdk | ||
|
||
ADD kafdrop.sh / | ||
ADD kafdrop*tar.gz / | ||
COPY kafdrop*.tar.gz /tmp/kafdrop.tar.gz | ||
|
||
RUN chmod +x /kafdrop.sh | ||
RUN mkdir /opt/kafdrop && \ | ||
tar \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This became a lot more complex than it used to be. Let's simplify this.
With these changes, the
|
||
-xz \ | ||
--strip-components=1 \ | ||
--no-same-owner \ | ||
-C /opt/kafdrop \ | ||
-f /tmp/kafdrop.tar.gz && \ | ||
rm /tmp/kafdrop.tar.gz && \ | ||
groupadd -g 1000 kafdrop && \ | ||
useradd -u 1000 -g kafdrop kafdrop && \ | ||
chown kafdrop:kafdrop /opt/kafdrop | ||
|
||
COPY --chmod=755 kafdrop.sh /opt/kafdrop | ||
|
||
USER kafdrop | ||
|
||
ENV PATH="/opt/java/openjdk/bin:$PATH" | ||
|
||
EXPOSE 9000 | ||
|
||
ENTRYPOINT ["/kafdrop.sh"] | ||
WORKDIR /opt/kafdrop | ||
|
||
ENTRYPOINT ["/opt/kafdrop/kafdrop.sh"] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -65,4 +65,4 @@ ARGS="--add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Xss256K \ | |||||
$HEAP_ARGS \ | ||||||
$JVM_OPTS" | ||||||
|
||||||
exec java $ARGS -jar /kafdrop*/kafdrop*jar ${CMD_ARGS} | ||||||
exec java $ARGS -jar /opt/kafdrop/kafdrop*.jar ${CMD_ARGS} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Due to the above mentioned changes, this path needs to be changed:
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this change, as the current change is incomplete, leading to these warnings that make the image build fail:
With that,
pom.xml
can be removed from your change set.