summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-03-30 11:40:12 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2020-04-02 11:25:14 +0200
commit047385e55632a1dd6398e414aa82397f380e449f (patch)
tree320f81dc9a58f360da0adf8eeaced5e279c643d4
parent36703953572a86f06db6c60285a3b3d358aa674c (diff)
Migrate Dockerfile.be to unprivileged user
Issue-ID: PORTAL-849 Change-Id: I58fe742980a24039114033a82fe785a1093391bf Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
-rw-r--r--deliveries/Dockerfile.be2
1 files changed, 2 insertions, 0 deletions
diff --git a/deliveries/Dockerfile.be b/deliveries/Dockerfile.be
index afc39816..21bb1a2c 100644
--- a/deliveries/Dockerfile.be
+++ b/deliveries/Dockerfile.be
@@ -39,7 +39,9 @@ RUN cd ${PORTALCONTEXT} && 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 && chown -R portal:portal . && chmod -R 777 /etc/ssl/certs/java /var/
+USER portal
# Switch back to root
WORKDIR /