Migrate Dockerfile.portal to unprivileged user 70/104670/2
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 30 Mar 2020 09:43:19 +0000 (11:43 +0200)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Thu, 2 Apr 2020 09:25:14 +0000 (11:25 +0200)
Issue-ID: PORTAL-849
Change-Id: I3060de8beddcba03be45f19ce8cd1fd0e32e62f5
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
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 /