From b1362860131464876a09890c59cb949e1587bf23 Mon Sep 17 00:00:00 2001 From: jananib Date: Wed, 15 Apr 2020 11:05:22 +0530 Subject: Making POD run as non-root Non-root user addition Change-Id: I82995b0c0a6eb815e0422c6072c111c889c8c84a Issue-ID: CCSDK-2149 Signed-off-by: jananib (cherry picked from commit 3a27f2fee05ef874181ea818f28329c2567e52c5) --- ms/blueprintsprocessor/application/src/main/docker/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ms/blueprintsprocessor') diff --git a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile index 1035915f1..042041ebb 100755 --- a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile +++ b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile @@ -9,9 +9,14 @@ FROM omahoco1/alpine-java-python # add entrypoint COPY startService.sh /startService.sh +RUN addgroup -S onap && adduser -S onap -G onap +RUN chown onap:onap /startService.sh RUN chmod 777 /startService.sh && dos2unix /startService.sh # add application COPY --from=extractor /opt /opt +RUN mkdir /opt/app/onap/blueprints +RUN chown onap:onap /opt -R +USER onap ENTRYPOINT [ "/startService.sh" ] -- cgit 1.2.3-korg