Skip to content

Commit

Permalink
reduce zeek image size
Browse files Browse the repository at this point in the history
  - clear yum cache
  - remove 10M OL9 release notes
  - remove zeek/share/btest/data/pcaps/*
    -  used for testing plugins
  • Loading branch information
reyesj2 committed Nov 26, 2024
1 parent 2004bf6 commit 99067d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions so-zeek/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ LABEL description="Zeek running in docker for use with Security Onion"
RUN dnf update -y && dnf -y install epel-release bash libpcap iproute && \
dnf clean all && rm -rf /var/cache/dnf/* && \
dnf -y install findutils jemalloc numactl libnl3 libdnet gdb libunwind-devel && \
dnf -y erase epel-release && dnf clean all && rm -rf /var/cache/dnf/* && \
dnf config-manager --enable ol9_codeready_builder && \
dnf -y install libnghttp2-devel brotli-devel && \
dnf config-manager --disable ol9_codeready_builder && \
dnf -y remove epel-release && \
dnf clean all && \
rm -rf /var/cache/dnf/ && rm -rf /var/cache/yum/ && \
rm -rf /usr/share/doc/oraclelinux-release/OL9-RELNOTES9-4.zip && \
groupadd --gid 937 zeek && \
adduser --uid 937 --gid 937 --home-dir /opt/zeek --no-create-home zeek

Expand All @@ -101,7 +104,7 @@ COPY --from=builder /usr/local/ssl/ /usr/local/ssl

# Copy over the entry script.
COPY files/zeek.sh /usr/local/sbin/zeek.sh
RUN chmod +x /usr/local/sbin/zeek.sh && rpm -i https://github.com/axellioinc/fx-libpcap/releases/download/px3_1.9.1-3/fx-libpcap-1.9.1-3.el9.x86_64.rpm
RUN chmod +x /usr/local/sbin/zeek.sh && rpm -i https://github.com/axellioinc/fx-libpcap/releases/download/px3_1.9.1-3/fx-libpcap-1.9.1-3.el9.x86_64.rpm && rm -rf /opt/zeek/share/btest/data/pcaps/*

HEALTHCHECK --interval=10m --timeout=2m CMD runuser -u zeek -- /opt/zeek/bin/zeekctl status || (kill -s 15 -1 && (sleep 30; kill -s 9 -1))

Expand Down

0 comments on commit 99067d9

Please sign in to comment.