aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgautamk189 <gautamkr@hcl.com>2020-02-19 18:45:41 +0530
committergautamk189 <gautamkr@hcl.com>2020-02-20 12:02:41 +0530
commit1075a55b629873bc80449572ff0efa20bb61a914 (patch)
treebd59ec3a7f363d93d24979fbcfddfd7c95ec7dac
parent468a4135dbffb875b07870182a2c85a9a71dfd46 (diff)
updated Dockerfile
Issue-ID: EXTAPI-384 Signed-off-by: gautamk189 <gautamkr@hcl.com> Change-Id: I4c5fa247d1e84e3991ab5e3a41fc60ff21dceb8d
-rw-r--r--Dockerfile18
1 files changed, 10 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index 6d2c3de..a0de641 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,12 +16,7 @@
FROM openjdk:11-jre-slim
-ARG SERVER_PORT
-ARG PKG_FILENAME=nbi-rest-services-5.0.1-SNAPSHOT.jar
-ADD target/$PKG_FILENAME app.jar
-
-RUN addgroup appgroup && useradd -ms /bin/bash appuser && adduser appuser appgroup && mkdir temptoscafile && chown appuser:appgroup temptoscafile/
-
+USER root
COPY src/main/resources/certificate /certs
ARG CERT_PASS=changeit
RUN for cert in $(ls -d /certs/*); do \
@@ -34,7 +29,14 @@ RUN for cert in $(ls -d /certs/*); do \
--noprompt; \
done
-USER appuser:appgroup
+USER onap
+
+ARG SERVER_PORT
+ARG PKG_FILENAME=nbi-rest-services-5.0.1-SNAPSHOT.jar
+ADD target/$PKG_FILENAME /opt/onap/app.jar
+
+RUN mkdir temptoscafile && chown onap:onap temptoscafile/
+
ENV SERVER_PORT=${SERVER_PORT:-8443}
ENV HTTP_PORT=${HTTP_PORT:-8080}
@@ -42,4 +44,4 @@ ENV JAVA_OPTS="-Dspring.profiles.active=ssl -Djava.security.egd=file:/dev/./uran
EXPOSE $SERVER_PORT
EXPOSE $HTTP_PORT
-ENTRYPOINT java -XX:+UseContainerSupport $JAVA_OPTS -jar /app.jar
+ENTRYPOINT java -XX:+UseContainerSupport $JAVA_OPTS -jar /opt/onap/app.jar