Run the app in the container as a non-root user (#1575)
* Run as a non-root user. Fixes #1555 Signed-off-by: Roman Zabaluev <rzabaluev@provectus.com> * Fix line break Signed-off-by: Roman Zabaluev <rzabaluev@provectus.com> Co-authored-by: Ruslan Ibragimov <94184844+5hin0bi@users.noreply.github.com>
This commit is contained in:
parent
edabfca966
commit
a040a66f09
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
FROM alpine:3.15.0
|
||||
RUN apk add --no-cache openjdk13-jre libc6-compat gcompat
|
||||
|
||||
RUN apk add --no-cache openjdk13-jre libc6-compat gcompat \
|
||||
&& addgroup -S kafkaui && adduser -S kafkaui -G kafkaui
|
||||
|
||||
USER kafkaui
|
||||
|
||||
ARG JAR_FILE
|
||||
COPY "/target/${JAR_FILE}" "/kafka-ui-api.jar"
|
||||
|
|
Loading…
Add table
Reference in a new issue