From 223045803c885f9a3f81f051e62cb8e36ae42b64 Mon Sep 17 00:00:00 2001 From: "sunil.unnava" Date: Mon, 8 Apr 2019 14:56:02 -0400 Subject: run as non root user Issue-ID: DMAAP-1040 Change-Id: Ie83ac32c4de72d3be1711a4c619507737ffd4181 Signed-off-by: sunil.unnava --- src/main/resources/docker/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/resources/docker/Dockerfile b/src/main/resources/docker/Dockerfile index 2639cea..9afd41e 100644 --- a/src/main/resources/docker/Dockerfile +++ b/src/main/resources/docker/Dockerfile @@ -21,7 +21,13 @@ FROM openjdk:8-alpine MAINTAINER DMAAP Team COPY appl /appl/ -COPY startup.sh / +COPY startup.sh /appl/ +WORKDIR /appl RUN chmod 700 /startup.sh EXPOSE 3904 3905 ENTRYPOINT ["sh", "./startup.sh"] +RUN addgroup -S onap \ + && adduser -S messagerouter -G onap \ + && chown -R messagerouter:onap /appl/ \ + +USER messagerouter \ No newline at end of file -- cgit 1.2.3-korg