Dockerfiles use non-root user (#1497)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -20,6 +20,10 @@ RUN set -x &&\
|
||||
|
||||
FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine
|
||||
|
||||
RUN addgroup -S hawkbit_group && adduser -D hawkbit -G hawkbit_group
|
||||
RUN mkdir -p /artifactrepo && chown -R hawkbit /artifactrepo
|
||||
USER hawkbit
|
||||
|
||||
ENV BUILD_DIR=/opt/hawkbit_build
|
||||
COPY --from=build ${BUILD_DIR}/dependencies/ ./
|
||||
COPY --from=build ${BUILD_DIR}/spring-boot-loader/ ./
|
||||
|
||||
Reference in New Issue
Block a user