-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom dockerfile for traffic mirroring (#403)
- Loading branch information
1 parent
cfe7356
commit cc4523f
Showing
2 changed files
with
35 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM --platform=linux/amd64 rust:buster AS rust-builder | ||
ENV RUSTFLAGS="-C target-feature=-crt-static" | ||
|
||
RUN apt update | ||
RUN apt install musl-dev g++ gcc bash autoconf automake libtool make python3 protobuf-compiler clang libclang-dev -y | ||
|
||
WORKDIR /app | ||
COPY ../../ingestors/rust-common/ rust-common | ||
RUN cd rust-common && cargo build --release | ||
RUN mv rust-common/target/release/metlo-agent metlo-agent | ||
|
||
FROM --platform=linux/amd64 golang:buster AS go-builder | ||
|
||
RUN apt update | ||
RUN apt install libpcap-dev gcc g++ -y | ||
|
||
WORKDIR /app | ||
|
||
COPY ../../ingestors/govxlan/ govxlan | ||
COPY ../../ingestors/rust-common/ rust-common | ||
RUN cd govxlan && go build -o metlo-pcap | ||
RUN mv govxlan/metlo-pcap metlo-pcap | ||
|
||
FROM --platform=linux/amd64 debian:buster | ||
|
||
RUN apt update | ||
RUN apt install bash libpcap-dev gcc -y | ||
|
||
WORKDIR /app | ||
COPY ../../../deploy/metlo-daemon-agent/entrypoint.sh ./entrypoint.sh | ||
COPY --from=go-builder /app/metlo-pcap ./metlo-pcap | ||
COPY --from=rust-builder /app/metlo-agent ./metlo-agent | ||
|
||
CMD ["/app/entrypoint.sh"] |