Skip to content

Commit

Permalink
Add doscstrings to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
QU3B1M committed Dec 12, 2024
1 parent 8827723 commit 76fade9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docker/ecs/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 76fade9

Please sign in to comment.