diff --git a/docker/ecs/images/Dockerfile b/docker/ecs/images/Dockerfile index fbcb6b4cfec45..f0b491786d19f 100644 --- a/docker/ecs/images/Dockerfile +++ b/docker/ecs/images/Dockerfile @@ -15,16 +15,16 @@ RUN apt-get update && \ mkdir -p /source/ecs # Ensure the generate.sh script is in the correct location -ADD docker/ecs/images/generate.sh /ecs/generate.sh +ADD docker/ecs/images/generate.sh /ecs/generator.sh # Define the directory as a volume to allow for external mounting VOLUME /source/ecs # Ensure the generate.sh script is executable -RUN chmod +x /ecs/generate.sh +RUN chmod +x /ecs/generator.sh # Set the working directory to the ECS repository WORKDIR /ecs # Define the entry point for the container to execute the generate.sh script -ENTRYPOINT ["/bin/bash", "/ecs/generate.sh"] +ENTRYPOINT ["/bin/bash", "/ecs/generator.sh"] diff --git a/docker/ecs/images/generate.sh b/docker/ecs/images/generator.sh similarity index 100% rename from docker/ecs/images/generate.sh rename to docker/ecs/images/generator.sh diff --git a/docker/ecs/ecs.sh b/docker/ecs/mapping-generator.sh similarity index 96% rename from docker/ecs/ecs.sh rename to docker/ecs/mapping-generator.sh index b492a7cd9c18b..c2cb0e6bbf51d 100644 --- a/docker/ecs/ecs.sh +++ b/docker/ecs/mapping-generator.sh @@ -10,6 +10,8 @@ set -e # The container is built only if needed, the tool can be executed several times # for different modules in the same build since the script runs as entrypoint + + # ==== # Checks that the script is run from the intended location # ==== @@ -40,17 +42,15 @@ function usage() { } function main() { + local compose_filename="docker/ecs/mapping-generator.yml" local compose_command - local compose_filename local module local repo_path navigate_to_project_root - compose_filename="docker/ecs/ecs.yml" compose_command="docker compose -f $compose_filename" - case $1 in run) if [[ "$#" -lt 2 || "$#" -gt 3 ]]; then diff --git a/docker/ecs/ecs.yml b/docker/ecs/mapping-generator.yml similarity index 92% rename from docker/ecs/ecs.yml rename to docker/ecs/mapping-generator.yml index b41905279ca84..e0ae24f468e98 100644 --- a/docker/ecs/ecs.yml +++ b/docker/ecs/mapping-generator.yml @@ -1,5 +1,5 @@ services: - wazuh-ecs-generator: + ecs-mapping-generator: image: wazuh-ecs-generator container_name: wazuh-ecs-generator build: