summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-tca-web/Dockerfile
diff options
context:
space:
mode:
authorKai <lukai@chinamobile.com>2020-02-19 17:43:26 +0800
committerKai <lukai@chinamobile.com>2020-02-19 17:44:42 +0800
commitf2b60295e7e93926ed875cccf5ef581d7d7a1314 (patch)
tree321fc352269f2a62c1b3fec39d61a02050734ca6 /dcae-analytics/dcae-analytics-tca-web/Dockerfile
parent24feebbfc962f2bab0773c561164d1f3bf947e2a (diff)
fix Logfile not generated within container
Issue-ID: DCAEGEN2-2077 Signed-off-by: Kai Lu <lukai@chinamobile.com> Change-Id: I877fcfb3c3c2c8ef1c0dae9249e65c5dfc29132a
Diffstat (limited to 'dcae-analytics/dcae-analytics-tca-web/Dockerfile')
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/Dockerfile7
1 files changed, 6 insertions, 1 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/Dockerfile b/dcae-analytics/dcae-analytics-tca-web/Dockerfile
index 7e84380..b6e4778 100644
--- a/dcae-analytics/dcae-analytics-tca-web/Dockerfile
+++ b/dcae-analytics/dcae-analytics-tca-web/Dockerfile
@@ -12,8 +12,13 @@ ARG FINAL_JAR
ARG DEPENDENCIES_DIR
ARG DOCKER_ARTIFACT_DIR
+RUN mkdir -p /var/log/ONAP/dcaegen2/analytics/tca-gen2
#Add a new user and group to allow container to be run as non-root
-RUN addgroup -S tca-gen2 && adduser -S -G tca-gen2 tca-gen2
+RUN addgroup -S tca-gen2 && adduser -S -G tca-gen2 tca-gen2; \
+ chmod a+rwx /opt; \
+ chmod a+rwx /var/log/ONAP/dcaegen2/analytics/tca-gen2; \
+ chown -R tca-gen2:tca-gen2 /opt; \
+ chown -R tca-gen2:tca-gen2 /var/log/ONAP/dcaegen2/analytics/tca-gen2
#Copy dependencies and executable jar
WORKDIR ${DOCKER_ARTIFACT_DIR}