forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |