CICFlowMeter over Docker
This project provides code for building a Docker image for CICFlowMeter, a PCAP-to-flow conversion tool from the Canadian Institute for Cybersecurity. Once built, the entry point for the image admits three ways for running the container, depending on command line parameters:
bash
or no parameter -- Runs thebash
shell into the container instance. Great for inspecting the container's runtime environment.sh
-- Same as above, but running the lesser-featuredsh
shell. Just because.- Other parameters -- Used as input and output paths for the
Cmd
class'smain
method. The former should either be a PCAP file or a folder container PCAP files; the latter is the directory where flow files are written.
Naturally, this container is most useful when bind-mounting directories containing your files, or as base for an ad hoc Docker image.
docker build [-t <image tag you choose>] .
Let's assume the image was built with tag cfm
.
Computing flows from packet capture files:
docker run --rm \
-v <path to folder with pcap files>:/pcap \
-v <path to output foler>:/flow \
cfm /pcap /flow
Interactive shell:
docker run --rm -ti cfm bash