From 76fade9cc6fdbed5a2c1d373bf4021c2589507be Mon Sep 17 00:00:00 2001 From: quebim Date: Thu, 12 Dec 2024 16:42:23 -0300 Subject: [PATCH] Add doscstrings to Dockerfile --- docker/ecs/images/Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docker/ecs/images/Dockerfile b/docker/ecs/images/Dockerfile index 169be6e204acc..fbcb6b4cfec45 100644 --- a/docker/ecs/images/Dockerfile +++ b/docker/ecs/images/Dockerfile @@ -1,25 +1,30 @@ FROM python:3.10 +# Update the package list and upgrade all packages RUN apt-get update && \ apt-get upgrade -y && \ + # Install dependencies apt-get install -y git jq && \ + # Cleanup apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ + # Clone elastic ECS repository and install required Python libraries git clone https://github.com/elastic/ecs.git && \ pip install -r ecs/scripts/requirements.txt && \ + # Create the directory for the ecs definitions (this will be used as a volume) mkdir -p /source/ecs -# Change this to a volume +# Ensure the generate.sh script is in the correct location ADD docker/ecs/images/generate.sh /ecs/generate.sh -#ADD docker/ecs/images/entrypoint.sh entrypoint.sh -#ADD ecs/ /source/ecs -# This directory will be attached to a volume -RUN mkdir -p /source/ecs +# 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 +# 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"]