aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 9cc5868..91a6a9d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -20,6 +20,9 @@ ARG SERVER_PORT
ARG PKG_FILENAME=nbi-rest-services-3.0.1.jar
ADD target/$PKG_FILENAME app.jar
+RUN addgroup -S appgroup
+RUN adduser -S appuser -G appgroup
+
COPY src/main/resources/certificate /certs
ARG CERT_PASS=changeit
RUN for cert in $(ls -d /certs/*); do \
@@ -32,6 +35,8 @@ RUN for cert in $(ls -d /certs/*); do \
--noprompt; \
done
+USER appuser:appgroup
+
ENV SERVER_PORT=${SERVER_PORT:-8080}
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"