-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: src/bin/probe.rs src/stream_data.rs
- Loading branch information
Showing
31 changed files
with
1,740 additions
and
2,358 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
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
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
This file was deleted.
Oops, something went wrong.
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,21 +1,47 @@ | ||
FROM rust:1.75.0 as builder | ||
RUN apt-get update && apt-get install -y cmake capnproto libpcap-dev | ||
FROM centos:7 as builder | ||
|
||
# Install required packages | ||
RUN yum install -y epel-release centos-release-scl && \ | ||
yum install -y devtoolset-11 rh-python38 && \ | ||
yum install -y wget curl git | ||
|
||
# Set up working directory | ||
WORKDIR /app | ||
COPY . . | ||
RUN cargo install --path . | ||
|
||
FROM cgr.dev/chainguard/wolfi-base AS binary | ||
COPY --from=builder /usr/local/cargo/bin/monitor /usr/local/bin/monitor | ||
RUN apk update && apk add --no-cache --update-cache zlib libgcc libpcap libstdc++ | ||
# Copy the install script and other necessary files | ||
COPY install.sh /app/ | ||
COPY scripts /app/scripts | ||
COPY meson-native-file.ini /app/ | ||
|
||
# Run the install script | ||
RUN /app/install.sh gst | ||
|
||
FROM centos:7 AS binary | ||
|
||
# Copy the installed RsProbe files from the builder stage | ||
COPY --from=builder /opt/rsprobe /opt/rsprobe | ||
|
||
# Install required runtime dependencies | ||
RUN yum install -y libpcap zlib glibc-devel libstdc++ && \ | ||
yum clean all | ||
|
||
# Set environment variables | ||
ARG SOURCE_DEVICE=eth0 | ||
ARG TARGET_IP=127.0.0.1 | ||
ARG TARGET_PORT=5556 | ||
ARG SOURCE_IP=224.0.0.200 | ||
ARG SOURCE_PORT=10001 | ||
ARG KAFKA_KEY= | ||
ARG KAFKA_TOPIC=rsprobe | ||
ARG KAFKA_BROKER=localhost:9092 | ||
ARG EXTRACT_IMAGES=true | ||
|
||
ENV RUST_LOG="error" | ||
ENV SOURCE_DEVICE=${SOURCE_DEVICE} | ||
ENV TARGET_IP=${TARGET_IP} | ||
ENV TARGET_PORT=${TARGET_PORT} | ||
ENV RUST_LOG="info" | ||
ENV SOURCE_IP=${SOURCE_IP} | ||
ENV SOURCE_PORT=${SOURCE_PORT} | ||
ENV KAFKA_KEY=${KAFKA_KEY} | ||
ENV KAFKA_TOPIC=${KAFKA_TOPIC} | ||
ENV KAFKA_BROKER=${KAFKA_BROKER} | ||
ENV EXTRACT_IMAGES=${EXTRACT_IMAGES} | ||
|
||
ENTRYPOINT ["probe", "--pcap-stats"] | ||
# Set the entrypoint | ||
ENTRYPOINT ["/opt/rsprobe/bin/probe", "--pcap-stats"] |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.