From 92d957730c86c82c72582248fc7fdfe73c213973 Mon Sep 17 00:00:00 2001 From: AlfonsoRBJ Date: Mon, 25 Mar 2019 17:36:27 +0100 Subject: [PATCH] remove alerts on build time --- wazuh/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wazuh/Dockerfile b/wazuh/Dockerfile index 5c8fa136..ff9a940d 100644 --- a/wazuh/Dockerfile +++ b/wazuh/Dockerfile @@ -17,7 +17,8 @@ RUN set -x && echo "deb https://packages.wazuh.com/3.x/apt/ stable main" | tee / RUN add-apt-repository universe && apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \ apt-get --no-install-recommends --no-install-suggests -y install openssl postfix bsd-mailx python-boto python-pip \ apt-transport-https vim expect nodejs python-cryptography mailutils libsasl2-modules wazuh-manager=${WAZUH_VERSION} \ - wazuh-api=${WAZUH_VERSION} && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + wazuh-api=${WAZUH_VERSION} && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -f \ + /var/ossec/logs/alerts/*/*/*.log && rm -f /var/ossec/logs/alerts/*/*/*.json # Adding first run script and entrypoint COPY config/data_dirs.env /data_dirs.env @@ -60,9 +61,6 @@ RUN chmod +x /etc/service/wazuh-api/run && \ chmod +x /etc/service/postfix/run && \ chmod +x /etc/service/filebeat/run -RUN echo -n > /var/ossec/logs/alerts/alerts.json -RUN echo -n > /var/ossec/logs/alerts/alerts.log - # Run all services ENTRYPOINT ["/entrypoint.sh"]