remove alerts on build time

This commit is contained in:
AlfonsoRBJ
2019-03-25 17:36:27 +01:00
parent 8823405dd9
commit 92d957730c
+2 -4
View File
@@ -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"]