aboutsummaryrefslogtreecommitdiffstats
path: root/deliveries/src/main/docker/docker-files/Dockerfile
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-04-10 13:37:40 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-10 13:37:40 +0000
commit54bf7af2909ff6a4294c35265bc096c360c1a650 (patch)
tree89644a9d1dc26171abee7a71769e33b101135761 /deliveries/src/main/docker/docker-files/Dockerfile
parent645680174effb1d92bb27f6c66ea6d861915f487 (diff)
parentb461e34d743867b0d9cc6d890475a81617e3578a (diff)
Merge "Run tomcat as onap user"
Diffstat (limited to 'deliveries/src/main/docker/docker-files/Dockerfile')
-rwxr-xr-xdeliveries/src/main/docker/docker-files/Dockerfile7
1 files changed, 5 insertions, 2 deletions
diff --git a/deliveries/src/main/docker/docker-files/Dockerfile b/deliveries/src/main/docker/docker-files/Dockerfile
index 3f9c1ade3..9b468530d 100755
--- a/deliveries/src/main/docker/docker-files/Dockerfile
+++ b/deliveries/src/main/docker/docker-files/Dockerfile
@@ -3,6 +3,8 @@ FROM tomcat:8.0-jre8-alpine
# add vim and uncomment alias to speedup troubleshooting purpose
RUN apk update && apk add openjdk8 vim net-tools
+RUN adduser --disabled-password onap onap
+RUN mkdir -p /opt/app
COPY conf.d/ /etc/onap/vid/conf.d/
# MariaDB variables
@@ -90,6 +92,7 @@ ADD maven/config/server.xml ${VID_TOMCAT_PATH}
ADD maven/scripts/*.sh /tmp/vid/
ADD maven/artifacts/vid.war /tmp/vid/stage/
+RUN chown onap:onap /tmp/vid /usr/local/tomcat /etc/onap/vid /opt/app -R
RUN chmod +x /tmp/vid/localize.sh
-
-CMD ["/tmp/vid/localize.sh"] \ No newline at end of file
+USER onap
+CMD ["/tmp/vid/localize.sh"]