open-nsm / ContainNSM

Dockerfiles for NSM tools
84 stars 14 forks source link

ContainNSM

OpenNSM's Docker image collection of NSM tools and software to effectively utilize them. We have 100's of images...

Menu

What?

Why?

Prerequisites

Use

Install

Make Menu

git clone https://github.com/open-nsm/ContainNSM && cd ContainNSM
sudo make install

Install

Layout

Directory structure is dead simple: tool_directory/version_directory/Dockerfile.

...
|-- argus
|   |-- 3.0.6.1
|   |   |-- Dockerfile
|   |-- 3.0.8.1
|       |-- Dockerfile
|-- bro
|   |-- 2.4
|   |   |-- Dockerfile
|   |-- 2.4.1
|       |-- Dockerfile
|-- daemonlogger
|   |-- 1.0.1
|   |   |-- Dockerfile
|   |-- 1.2.0
|   |   |-- Dockerfile
...

Obtaining Images

Options:

Listing Available Images

Running Containers

Tools are executed in containers with results passed to the host. Using ./containnsm we can easily do things like:

Notes: If a version tag e.g. :2.8.1 is not specified the latest version of the image will be used. Options and arguments passed after -- are run inside the container. When using options such as -r, -w, -C an absolute path must be the argument. -r and -w can take multiple directories or files as arguments when delimited by a comma.

By default, without a colon signifying src_mount:dst_mount a path will be evaluated to be the same path on the host as in the container. For example, -r /pcap/test.pcap will mount the same path in the container which allows you to then read from the path in the container via tcpdump -nr /pcap/test.pcap. Any directories not available in container but in the path will be created on the fly to match the path (this is behavior of Docker) and works to our advantage.

Informational messages are written to stderr, if they're bothering you send them to bitbucket with 2>/dev/null or use quiet mode with -q.

Examples

Graph throughput on Docker host's physical eth0 interface while downloading a Docker image of Bro 2.4.

Speedometer