Fixes for cloud Elastic 7 (#260)

Former-commit-id: ca1578ed27
This commit is contained in:
AlfonsoRBJ
2019-10-03 17:38:43 +02:00
committed by Jesús Linares
parent fdb55e8ce1
commit ddd37f0f9a
13 changed files with 233 additions and 46 deletions
+12 -3
View File
@@ -10,6 +10,7 @@ ENV API_USER="foo" \
API_PASS="bar"
ARG TEMPLATE_VERSION="v3.10.2"
ENV FILEBEAT_DESTINATION="elasticsearch"
# Install packages
RUN set -x && \
@@ -56,8 +57,8 @@ RUN chmod +x /etc/service/wazuh-api/run && \
chmod +x /etc/service/filebeat/run
# Copy configuration files from repository
COPY config/filebeat.yml /etc/filebeat/
RUN chmod go-w /etc/filebeat/filebeat.yml
COPY config/filebeat_to_elasticsearch.yml ./
COPY config/filebeat_to_logstash.yml ./
# Prepare permanent data
# Sync calls are due to https://github.com/docker/docker/issues/9547
@@ -94,12 +95,16 @@ RUN mkdir /entrypoint-scripts
COPY config/entrypoint.sh /entrypoint.sh
COPY config/00-decrypt_credentials.sh /entrypoint-scripts/00-decrypt_credentials.sh
COPY config/01-wazuh.sh /entrypoint-scripts/01-wazuh.sh
COPY config/02-set_filebeat_destination.sh /entrypoint-scripts/02-set_filebeat_destination.sh
COPY config/03-config_filebeat.sh /entrypoint-scripts/03-config_filebeat.sh
COPY config/05-remove_credentials_file.sh /entrypoint-scripts/05-remove_credentials_file.sh
COPY config/10-backups.sh /entrypoint-scripts/10-backups.sh
COPY config/20-ossec-configuration.sh /entrypoint-scripts/20-ossec-configuration.sh
RUN chmod 755 /entrypoint.sh && \
chmod 755 /entrypoint-scripts/01-wazuh.sh && \
chmod 755 /entrypoint-scripts/00-decrypt_credentials.sh && \
chmod 755 /entrypoint-scripts/01-wazuh.sh && \
chmod 755 /entrypoint-scripts/02-set_filebeat_destination.sh && \
chmod 755 /entrypoint-scripts/03-config_filebeat.sh && \
chmod 755 /entrypoint-scripts/05-remove_credentials_file.sh && \
chmod 755 /entrypoint-scripts/10-backups.sh && \
chmod 755 /entrypoint-scripts/20-ossec-configuration.sh
@@ -111,5 +116,9 @@ RUN chmod 755 /entrypoint.sh && \
COPY --chown=root:ossec config/agents.js /var/ossec/api/controllers/agents.js
RUN chmod 770 /var/ossec/api/controllers/agents.js
# Load wazuh alerts template.
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 all services
ENTRYPOINT ["/entrypoint.sh"]