From 7d9d55219ce19988c84522cbc9b17eaa10a9dc00 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Mon, 30 Mar 2020 11:48:26 +0200 Subject: Migrate Dockerfile.sdk to unprivileged user Issue-ID: PORTAL-849 Change-Id: If0cf112cd627c431e4ca08329e0da3ee5d8b8bdc Signed-off-by: Pawel Wieczorek (cherry picked from commit 59ad77a586b7b00396fba2ad0273b595e98676a6) --- deliveries/Dockerfile.sdk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'deliveries/Dockerfile.sdk') diff --git a/deliveries/Dockerfile.sdk b/deliveries/Dockerfile.sdk index 5f96aaad..4757d8a4 100644 --- a/deliveries/Dockerfile.sdk +++ b/deliveries/Dockerfile.sdk @@ -38,6 +38,10 @@ RUN cd ${SDKCONTEXT} && unzip -q *.war && rm *.war 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 / -- cgit 1.2.3-korg