summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-03-30 11:48:26 +0200
committerSunder Tattavarada <statta@research.att.com>2020-04-03 16:48:58 +0000
commit7d9d55219ce19988c84522cbc9b17eaa10a9dc00 (patch)
tree68e5f0110f525edb8ff681efb3650be639ea0acf
parentae737cbbbe7c602e46a6093db9ae924900e603e5 (diff)
Migrate Dockerfile.sdk to unprivileged user
Issue-ID: PORTAL-849 Change-Id: If0cf112cd627c431e4ca08329e0da3ee5d8b8bdc Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com> (cherry picked from commit 59ad77a586b7b00396fba2ad0273b595e98676a6)
-rw-r--r--deliveries/Dockerfile.sdk4
1 files changed, 4 insertions, 0 deletions
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 /