Merge "Migrate Dockerfile.portal to unprivileged user" into release-3.2.0
authorSunder Tattavarada <statta@research.att.com>
Mon, 6 Apr 2020 19:14:38 +0000 (19:14 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 6 Apr 2020 19:14:38 +0000 (19:14 +0000)
deliveries/Dockerfile.portal

index f12a3e3..cce3ed0 100644 (file)
@@ -41,6 +41,10 @@ COPY ${FE_DIR} ${PORTALCONTEXT}/public
 
 VOLUME ${TOMCATHOME}/logs
 
+# Switch to unprivileged user
+RUN addgroup -g 1000 -S portal && adduser -u 1000 -S portal -G portal
+USER portal
+
 # Switch back to root
 WORKDIR /