Skip to content

Commit

Permalink
store changes
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Nov 28, 2024
1 parent ab2eefb commit dd08f88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,24 @@ ENV PATH=$GRADLE_HOME/bin/$PATH
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Create a non-root user and set up permissions
RUN useradd -ms /bin/bash indexer && mkdir -p /home/indexer/artifacts && chown -R indexer:indexer /home/indexer
#RUN useradd -ms /bin/bash -u 1000 wazuh-indexer && \
# mkdir -p /home/wazuh-indexer/artifacts && \
# chown -R 1000 /home/wazuh-indexer

# Copy your build scripts into the container as root
ADD entrypoint.sh /home/indexer/
ADD docker/builder/entrypoint.sh /home/wazuh-indexer/

# Change file permissions as root
RUN chmod +x /home/indexer/entrypoint.sh
RUN chmod +x /home/wazuh-indexer/entrypoint.sh

# Create volume dir=
VOLUME /home/indexer/artifacts
#VOLUME /home/wazuh-indexer/artifacts

# Switch to non-root user
USER indexer
USER wazuh-indexer

# Set the working directory
WORKDIR /home/indexer
WORKDIR /home/wazuh-indexer

# Entry point to the build script
ENTRYPOINT ["./entrypoint.sh"]
2 changes: 1 addition & 1 deletion docker/builder/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ clone_repositories() {
echo "----------------------------------------"
echo "Cloning Repositories"
echo "----------------------------------------"
git clone --branch "$INDEXER_BRANCH" https://github.com/wazuh/wazuh-indexer --depth 1 ~/wazuh-indexer
#git clone --branch "$INDEXER_BRANCH" https://github.com/wazuh/wazuh-indexer --depth 1 ~/wazuh-indexer
git clone --branch "$INDEXER_PLUGINS_BRANCH" https://github.com/wazuh/wazuh-indexer-plugins --depth 1 ~/wazuh-indexer-plugins
git clone --branch "$INDEXER_REPORTING_BRANCH" https://github.com/wazuh/wazuh-indexer-reporting --depth 1 ~/wazuh-indexer-reporting
}
Expand Down

0 comments on commit dd08f88

Please sign in to comment.