aboutsummaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2019-07-15 16:47:52 -0400
committerMichael Hwang <mhwang@research.att.com>2019-07-15 16:55:32 -0400
commite8e64c41b1da24273ab4568fcbe4c2f4683c53f3 (patch)
tree04b278bfa8bd3845d0d6919342f752f11a7b1ed9 /pom.xml
parentcfb4963e45e28dfa819dacbfa54534a90a0fa647 (diff)
Add non-root user to Docker image
Change-Id: Ie065edb17b7a8dba7086e12e2a2249cbbfcaf32d Issue-ID: DCAEGEN2-1554 Signed-off-by: Michael Hwang <mhwang@research.att.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 08bb09f..282659d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -343,6 +343,10 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<configuration>
<imageName>${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId}</imageName>
<baseImage>openjdk:8-jre</baseImage>
+ <user>inventory</user>
+ <runs>
+ <run>adduser --system --group inventory</run>
+ </runs>
<entryPoint>["java", "-jar", "/opt/${project.build.finalName}.jar", "server"]</entryPoint>
<resources>
<resource>