aboutsummaryrefslogtreecommitdiffstats
path: root/certService/Dockerfile
diff options
context:
space:
mode:
authorPawel <pawel.kasperkiewicz@nokia.com>2020-02-07 13:26:25 +0100
committerPawel <pawel.kasperkiewicz@nokia.com>2020-02-07 14:42:24 +0100
commit9fce490595b068bac4fbd110fee78a4fa2407d91 (patch)
tree1e9b8add5e3a83f9d28fdd6ee2d643c39efaabcb /certService/Dockerfile
parent4dd87396681cc8ad89256c6a329b51f14c113306 (diff)
Dockerfile: CertService run as certService user
Issue-ID: AAF-995 Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com> Change-Id: I53a4554524dd6266c9c8972dc5fa668f09b33ff2
Diffstat (limited to 'certService/Dockerfile')
-rw-r--r--certService/Dockerfile10
1 files changed, 8 insertions, 2 deletions
diff --git a/certService/Dockerfile b/certService/Dockerfile
index b6a657a1..70617ede 100644
--- a/certService/Dockerfile
+++ b/certService/Dockerfile
@@ -2,6 +2,12 @@ FROM docker.io/openjdk:11-jre-slim
ARG VERSION=0.0.1-SNAPSHOT
-COPY target/cert-service-${VERSION}.jar ./app/cert-service.jar
+RUN groupadd certService && useradd -g certService certService
-ENTRYPOINT ["java","-jar","./app/cert-service.jar"]
+RUN chown -R certService:certService /var/log
+
+USER certService:certService
+
+COPY target/cert-service-${VERSION}.jar ./opt/onap/aaf/certservice/cert-service.jar
+
+ENTRYPOINT ["java","-jar","./opt/onap/aaf/certservice/cert-service.jar"]