Skip to main content

Whisperers as Docker containers attached to other Dockers containers

Whisperers may be hooked into others running containers.

Setup

In this case, you need to have Docker (or an alternative) running in your server, and you launch a Whisperer attaching its network to the other container network.

By command line

You may attach the whisperer to another container by command line:

docker run -d \
--network container:container-to-capture \
-e "CONFIG=""$(cat ./whisperer-config.json)""" \
--restart unless-stopped \
registry.gitlab.com/spider-analyzer/public-images/whisperer

The network option tells Docker to share the network stack of container-to-capture with the Whisperer.
The -e loads the Whisperer config file from a local file ./whisperer-config.json (adjust it to your needs) into CONFIG environment variable.

Refer to official Docker run reference documentation for more options.

tip

You may include this command in a shell script and have it restart

From within the docker-compose file

You may also do it straight from the docker-compose.yml file

whisperer:
image: registry.gitlab.com/spider-analyzer/public-images/whisperer
volumes: #or use environment variables
- ./whisperer-config.json:/app/whisperer-config.json
network_mode: "service:container-to-capture"

Check Docker compose reference from more options.

Whisperer options

Options may be defined from environment variables:

Name (*: mandatory)DescriptionDefault
CONFIG *JSON configuration value for the Whisperer. May also be mounted as ./whisperer-config.json in the container.
LOGWhen HUMAN, logs will be formatted by Bunyan library for better reading with colors etc.
LOG_LEVELDefine the log level. May be FATAL, ERROR, WARN, INFO, DEBUG, TRACEINFO
HOSTNAME or PARENT_HOSTNAMESent back to the server in the hostname field of status.
Used for proper identification in the UI.
INSTANCE_IDUsed to differentiate replicas of a same Whisperer.
Must be unique by Whisperer.
os.hostname()
CONTAINER_NAMESent back to the server in the containeName field of status.
Used for proper identification in the UI.
HOSTS_TO_RESOLVEMay provide a list of '\n' separated hostnames to resolve and load in cache before starting parsing.
DNSCACHE_HOSTUsed to force a DNS server. Even to connect to Spider server. Specifies its hostname or IP.
DNSCACHE_PORTUsed to force a DNS server. Even to connect to Spider server. Specifies its port.53
CAPTURE_OWN_COMSIf set - whatever value that resolve to true -, the Whisperer will also capture its communications to Spider. DANGEROUS!