From 69441fcf18d985219c73c743937ebc62680e87db Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Tue, 15 Nov 2022 12:52:43 +0800 Subject: [PATCH] Revert to root user Issue-ID: INF-335 Signed-off-by: Bin Yang Change-Id: If5fd7cc1390fbc3928c616c6480231aa0de6abe8 --- Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5cf60ee..ff9a4e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,20 +4,21 @@ FROM nexus3.onap.org:10001/onap/integration-python:10.1.0 USER root -RUN set -ex \ - && mkdir -p /src \ - && mkdir -p /configs/ \ - && mkdir -p /src/o2app/ \ - && mkdir -p /src/helm_sdk/ - ARG user=orano2 ARG group=orano2 # Create a group and user RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \ chown -R $user:$group /home/$user && \ mkdir /var/log/$user && \ + mkdir -p /src && \ + mkdir -p /configs/ && \ + mkdir -p /src/o2app/ && \ + mkdir -p /src/helm_sdk/ && \ + mkdir -p /etc/o2/ && \ chown -R $user:$group /var/log/$user && \ - chown -R $user:$group /src + chown -R $user:$group /src && \ + chown -R $user:$group /configs && \ + chown -R $user:$group /etc/o2/ COPY requirements.txt /tmp/ COPY requirements-stx.txt /tmp/ @@ -82,4 +83,4 @@ RUN set -ex \ WORKDIR /src -USER $user +# USER $user -- 2.16.6