From 88b2184cd2dfa2353c6b36cf1a8e51fd08840904 Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Wed, 4 Sep 2024 16:11:56 +0200 Subject: [PATCH] install with root --- be-java-springboot/files/docker/Dockerfile | 4 ++++ be-scala-play/files/docker/Dockerfile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/be-java-springboot/files/docker/Dockerfile b/be-java-springboot/files/docker/Dockerfile index 1529eed5c..c4c6da9e5 100644 --- a/be-java-springboot/files/docker/Dockerfile +++ b/be-java-springboot/files/docker/Dockerfile @@ -6,9 +6,13 @@ ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true COPY app.jar app.jar +USER root + RUN microdnf upgrade -y && \ microdnf clean all +USER 1001 + EXPOSE 8080 CMD ["java","-Xmx512m", "-jar", "app.jar"] diff --git a/be-scala-play/files/docker/Dockerfile b/be-scala-play/files/docker/Dockerfile index 110cdb28e..ae273af0a 100644 --- a/be-scala-play/files/docker/Dockerfile +++ b/be-scala-play/files/docker/Dockerfile @@ -4,9 +4,13 @@ WORKDIR /app COPY lib/* /app/lib/ COPY conf /app/conf/ +USER root + RUN microdnf upgrade -y && \ microdnf clean all +USER 1001 + EXPOSE 8080 ENTRYPOINT ["java", "-Duser.dir=/app", "-XX:+UnlockExperimentalVMOptions", "-cp", "conf/:lib/*"]