This is an automated email from the ASF dual-hosted git repository.

oleewere pushed a commit to branch cloudbreak
in repository https://gitbox.apache.org/repos/asf/ambari-logsearch.git


The following commit(s) were added to refs/heads/cloudbreak by this push:
     new 14c0c79  Use logsearch user for Log Search container
14c0c79 is described below

commit 14c0c79882aa1c144978789f08ec46741ebfd370
Author: Oliver Szabo <[email protected]>
AuthorDate: Tue Oct 2 02:17:01 2018 +0200

    Use logsearch user for Log Search container
---
 jenkins/containers/docker-logsearch-portal/Dockerfile      | 6 +++++-
 jenkins/containers/docker-logsearch-portal/conf/log4j2.yml | 3 +--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/jenkins/containers/docker-logsearch-portal/Dockerfile 
b/jenkins/containers/docker-logsearch-portal/Dockerfile
index 03ded63..97e9964 100644
--- a/jenkins/containers/docker-logsearch-portal/Dockerfile
+++ b/jenkins/containers/docker-logsearch-portal/Dockerfile
@@ -29,8 +29,9 @@ ENV LOGSEARCH_INIT_FILE /init.sh
 ENV LOGSEARCH_PORT="61888"
 ENV LOGSEARCH_PATH="/usr/lib/ambari-logsearch-portal"
 ENV LOGSEARCH_CONF_DIR="/usr/lib/ambari-logsearch-portal/conf"
+ENV LOG_PATH="/var/log/ambari-logsearch-portal"
 ENV LOGFILE="/var/log/ambari-logsearch-portal/logsearch.log"
-ENV PID_FILE="/var/run/ambari-logsearch-portal/logsearch.pid"
+ENV LOGSEARCH_PID_FILE="/var/run/ambari-logsearch-portal/logsearch.pid"
 
 ENV LOGSEARCH_DEBUG=false
 ENV LOGSEARCH_DEBUG_PORT=5005
@@ -38,6 +39,8 @@ ENV LOGSEARCH_SSL="false"
 
 RUN groupadd -r --gid $LOGSEARCH_GID $LOGSEARCH_GROUP && useradd -r --uid 
$LOGSEARCH_UID --gid $LOGSEARCH_GID $LOGSEARCH_USER
 RUN chown -R $LOGSEARCH_USER:$LOGSEARCH_GROUP /usr/lib/ambari-logsearch-portal
+RUN mkdir -p /var/log/ambari-logsearch-portal && chown -R 
$LOGSEARCH_USER:$LOGSEARCH_GROUP /var/log/ambari-logsearch-portal
+RUN mkdir -p /var/run/ambari-logsearch-portal && chown -R 
$LOGSEARCH_USER:$LOGSEARCH_GROUP /var/run/ambari-logsearch-portal
 RUN find /usr/lib/ambari-logsearch-portal -type d -exec chmod 755 {} +
 RUN find /usr/lib/ambari-logsearch-portal -type f -exec chmod 644 {} +
 RUN chmod 755 $LOGSEARCH_PATH/bin/logsearch.sh
@@ -45,5 +48,6 @@ RUN chmod 755 $LOGSEARCH_PATH/conf/logsearch-env.sh
 RUN chmod 755 /entrypoint.sh
 RUN chmod 755 /init.sh
 
+USER $LOGSEARCH_USER
 WORKDIR /usr/lib/ambari-logsearch-portal
 CMD ["/entrypoint.sh"]
\ No newline at end of file
diff --git a/jenkins/containers/docker-logsearch-portal/conf/log4j2.yml 
b/jenkins/containers/docker-logsearch-portal/conf/log4j2.yml
index 3e4fa63..c49373c 100644
--- a/jenkins/containers/docker-logsearch-portal/conf/log4j2.yml
+++ b/jenkins/containers/docker-logsearch-portal/conf/log4j2.yml
@@ -46,5 +46,4 @@ Configutation:
     Root:
       level: info
       AppenderRef:
-      - ref: Console_Appender
-      - ref: RollingFile_Appender
\ No newline at end of file
+      - ref: Console_Appender
\ No newline at end of file

Reply via email to