From e8e64c41b1da24273ab4568fcbe4c2f4683c53f3 Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Mon, 15 Jul 2019 16:47:52 -0400 Subject: Add non-root user to Docker image Change-Id: Ie065edb17b7a8dba7086e12e2a2249cbbfcaf32d Issue-ID: DCAEGEN2-1554 Signed-off-by: Michael Hwang --- CHANGELOG.md | 4 ++++ pom.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c27804..52ac665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). The version in the brackets represents the version of DCAE inventory and not the ONAP DCAE version. +## [Dev] + +* Add non-root user in Docker image so that the inventory service can be run in non-privileged mode for security reasons + ## [3.0.1] * Explicitly use 5.3.6.Final for hibernate-validator and 9.4.6 for jetty-util to address security issues 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. ${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId} openjdk:8-jre + inventory + + adduser --system --group inventory + ["java", "-jar", "/opt/${project.build.finalName}.jar", "server"] -- cgit 1.2.3-korg