Skip to content

Commit

Permalink
Add basic entrypoint script
Browse files Browse the repository at this point in the history
  • Loading branch information
QU3B1M committed Dec 10, 2024
1 parent d5046b2 commit 318117a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/ecs/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ RUN apt-get update && \
apt-get upgrade && \
apt-get install \
git && \
apt-get clean \ && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
git clone https://github.com/elastic/ecs.git

# Change this to a volume
ADD docker/ecs/images/generate.sh ecs/generate.sh
ADD docker/ecs/images/entrypoint.sh entrypoint.sh
ADD . wazuh-indexer/

ENTRYPOINT ["entrypoint.sh"]
16 changes: 16 additions & 0 deletions docker/ecs/images/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# SPDX-License-Identifier: Apache-2.0
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.

ECS_VERSION="${ECS_VERSION:-v8.11.0}"
INDEXER_SRC="${INDEXER_SRC:-/wazuh-indexer}"

if [ -z "$ECS_DEFINITION" ]; then
echo "Error: ECS_DEFINITION environment variable missing."
exit 1
fi

bash ./generate.sh "$ECS_VERSION" "$INDEXER_SRC" "$ECS_DEFINITION"

0 comments on commit 318117a

Please sign in to comment.