aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--datarouter-node/src/main/resources/docker/Dockerfile8
-rw-r--r--datarouter-prov/src/main/resources/docker/Dockerfile9
-rw-r--r--datarouter-subscriber/src/main/resources/docker/Dockerfile6
3 files changed, 21 insertions, 2 deletions
diff --git a/datarouter-node/src/main/resources/docker/Dockerfile b/datarouter-node/src/main/resources/docker/Dockerfile
index 39007732..d57fbef5 100644
--- a/datarouter-node/src/main/resources/docker/Dockerfile
+++ b/datarouter-node/src/main/resources/docker/Dockerfile
@@ -25,10 +25,16 @@ MAINTAINER DMAAP Team
COPY /opt /opt
# curl used for healthcheck
-CMD apt update && apt add curl
+RUN apk update && apk add curl && apk add vim
EXPOSE 8080 8443
WORKDIR /opt
RUN chmod 0700 startup.sh
ENTRYPOINT ["sh", "startup.sh"]
+
+RUN addgroup -S onap \
+ && adduser -S datarouter -G onap \
+ && chown -R datarouter:onap /opt/
+
+USER datarouter \ No newline at end of file
diff --git a/datarouter-prov/src/main/resources/docker/Dockerfile b/datarouter-prov/src/main/resources/docker/Dockerfile
index b11925a0..fb512a4b 100644
--- a/datarouter-prov/src/main/resources/docker/Dockerfile
+++ b/datarouter-prov/src/main/resources/docker/Dockerfile
@@ -24,10 +24,17 @@ MAINTAINER DMAAP Team
COPY /opt /opt
-RUN apk update && apk add curl
+RUN apk update && apk add curl && apk add vim
EXPOSE 8080 8443
WORKDIR /opt
RUN chmod 0700 startup.sh
+
ENTRYPOINT ["sh", "startup.sh"]
+
+RUN addgroup -S onap \
+ && adduser -S datarouter -G onap \
+ && chown -R datarouter:onap /opt/
+
+USER datarouter
diff --git a/datarouter-subscriber/src/main/resources/docker/Dockerfile b/datarouter-subscriber/src/main/resources/docker/Dockerfile
index fe6d2fc3..7892ff75 100644
--- a/datarouter-subscriber/src/main/resources/docker/Dockerfile
+++ b/datarouter-subscriber/src/main/resources/docker/Dockerfile
@@ -29,3 +29,9 @@ EXPOSE 8080 8443
WORKDIR /opt
RUN chmod 0700 startup.sh
ENTRYPOINT ["sh", "startup.sh"]
+
+RUN addgroup -S onap \
+ && adduser -S datarouter -G onap \
+ && chown -R datarouter:onap /opt/
+
+USER datarouter \ No newline at end of file