Skip to content

Commit

Permalink
Merge pull request #543 from Security-Onion-Solutions/fix/elastic_8_10_4
Browse files Browse the repository at this point in the history
Revert back to 8.10.4
  • Loading branch information
weslambert authored Jun 27, 2024
2 parents aca7c7d + 27c2a2f commit 7cc7682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
9 changes: 2 additions & 7 deletions so-elastic-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This Dockerfile was based on the official Elastic Agent Docker image:
# https://hub.docker.com/r/elastic/elastic-agent

# Copyright Security Onion Solutions, LLC

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Expand All @@ -16,15 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
ARG VERSION

FROM docker.elastic.co/beats/elastic-agent:$VERSION

ARG GID=947
ARG UID=947
ARG USERNAME=elastic-agent

USER root
RUN groupmod -g ${GID} ${USERNAME} && \
usermod -u ${UID} -g ${GID} ${USERNAME}
usermod -u ${UID} -g ${GID} ${USERNAME}

RUN chown ${USERNAME}:${USERNAME} /usr/share/elastic-agent/data/elastic-agent-*/components/*
RUN chown ${USERNAME}:${USERNAME} /usr/share/elastic-agent/data/elastic-agent-*/components/filebeat* /usr/share/elastic-agent/data/elastic-agent-*/components/metricbeat*
10 changes: 0 additions & 10 deletions so-elastic-fleet-package-registry/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Copyright Security Onion Solutions, LLC

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Expand All @@ -16,28 +15,19 @@ ARG VERSION

FROM docker.elastic.co/package-registry/distribution:$VERSION as original_image

# Add bash because it is not included in the new default base image of wolfi-base (default sh shell)
RUN apk add --no-cache bash

# Remove unsupported packages
COPY scripts /scripts
RUN chmod +x /scripts/supported-integrations.sh && bash /scripts/supported-integrations.sh && rm -rf /scripts

# Cleanup unneeded packages, keeping the two most recent versons of each one
# Except for endpoint packages, keep all versions
RUN cd /packages/package-storage/ \
&& rm -rf suricata-* zeek-* dga-* endpoint*dev* endpoint*next* *preview* *beta* \
&& cd /packages/package-storage/ && LIST=$(ls --ignore="endpoint-*" | awk -F'[-]' '{print $1}' | sort | uniq ) \
&& for item in $LIST; do ls $item-*.zip | cut -d '-' -f 2 | tr - \~ | sort -V | tr \~ - | head -n-2 | xargs -I {} echo "$item-"{} | xargs -r rm -fr; done

FROM scratch

COPY --from=original_image / /
WORKDIR /package-registry

EXPOSE 8080
ENTRYPOINT ["./package-registry"]

ENV EPR_ADDRESS=0.0.0.0:8080

HEALTHCHECK --interval=1m --retries=30 CMD curl --silent --fail localhost:8080/health || exit 1

0 comments on commit 7cc7682

Please sign in to comment.