From 25a604f80ce90270ff7d104caff2fdd6948cbfa1 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Mon, 30 Mar 2020 11:43:19 +0200 Subject: [PATCH] Migrate Dockerfile.portal to unprivileged user Issue-ID: PORTAL-849 Change-Id: I3060de8beddcba03be45f19ce8cd1fd0e32e62f5 Signed-off-by: Pawel Wieczorek (cherry picked from commit 048ca4538f32b27667271d1a32f5a95b0731f1f9) --- deliveries/Dockerfile.portal | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deliveries/Dockerfile.portal b/deliveries/Dockerfile.portal index f12a3e30..cce3ed09 100644 --- a/deliveries/Dockerfile.portal +++ b/deliveries/Dockerfile.portal @@ -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 / -- 2.16.6