mirror of
https://github.com/wazuh/wazuh-docker.git
synced 2025-11-03 05:23:14 +00:00
Move filebeat installation to the build stage
This commit is contained in:
@@ -76,5 +76,8 @@ RUN chmod +x /etc/service/wazuh-api/run && \
|
|||||||
ADD https://raw.githubusercontent.com/wazuh/wazuh/$TEMPLATE_VERSION/extensions/elasticsearch/7.x/wazuh-template.json /etc/filebeat
|
ADD https://raw.githubusercontent.com/wazuh/wazuh/$TEMPLATE_VERSION/extensions/elasticsearch/7.x/wazuh-template.json /etc/filebeat
|
||||||
RUN chmod go-w /etc/filebeat/wazuh-template.json
|
RUN chmod go-w /etc/filebeat/wazuh-template.json
|
||||||
|
|
||||||
|
ARG WAZUH_FILEBEAT_MODULE="wazuh-filebeat-0.1.tar.gz"
|
||||||
|
RUN curl -s https://packages.wazuh.com/3.x/filebeat/${WAZUH_FILEBEAT_MODULE} | tar -xvz -C /usr/share/filebeat/module
|
||||||
|
|
||||||
# Run all services
|
# Run all services
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
@@ -3,16 +3,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
WAZUH_FILEBEAT_MODULE=wazuh-filebeat-0.1.tar.gz
|
|
||||||
|
|
||||||
# Modify the output to Elasticsearch if th ELASTICSEARCH_URL is set
|
# Modify the output to Elasticsearch if th ELASTICSEARCH_URL is set
|
||||||
if [ "$ELASTICSEARCH_URL" != "" ]; then
|
if [ "$ELASTICSEARCH_URL" != "" ]; then
|
||||||
>&2 echo "Customize Elasticsearch ouput IP."
|
>&2 echo "Customize Elasticsearch ouput IP."
|
||||||
sed -i 's|http://elasticsearch:9200|'$ELASTICSEARCH_URL'|g' /etc/filebeat/filebeat.yml
|
sed -i 's|http://elasticsearch:9200|'$ELASTICSEARCH_URL'|g' /etc/filebeat/filebeat.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Wazuh Filebeat Module
|
|
||||||
|
|
||||||
curl -s "https://packages.wazuh.com/3.x/filebeat/${WAZUH_FILEBEAT_MODULE}" | tar -xvz -C /usr/share/filebeat/module
|
|
||||||
mkdir -p /usr/share/filebeat/module/wazuh
|
|
||||||
chmod 755 -R /usr/share/filebeat/module/wazuh
|
|
||||||
|
|||||||
Reference in New Issue
Block a user