Home / Edge/ Deploying Edge·Running in a Docker Container

Running in a Docker Container

As a best practice, we recommend using the UI to concatenate and copy/paste the bootstrap script for adding a Docker node.

Or, for a single-instance deployment, start the container with the Docker command below:

docker run -d -e CRIBL_EDGE=1 \
 -p 9420:9420 \
 -v /var/run/appscope:/var/run/appscope \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v /:/hostfs:ro \
 --privileged \
 --restart unless-stopped \
 --name cribl-edge \
 cribl/cribl:latest

For a distributed deployment, edit the Docker command below to replace INSERT_TOKEN with a unique, secure token value. Then start the container with the revised command.

docker run -d \
 --privileged \
 -e CRIBL_DIST_MODE=managed-edge \
 -e CRIBL_DIST_LEADER_URL=tcp://INSERT_TOKEN@leaderhere:4200?group=fleet_name
 -e "CRIBL_EDGE=1" 
 -v /var/run/appscope:/var/run/appscope \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v /:/hostfs:ro \
 -p 9420:9420
 --restart unless-stopped \
 --name cribl-edge \
 cribl/cribl:latest

With a Leader on Cribl.Cloud, encryption is enabled by default. Set the hybrid worker’s CRIBL_DIST_LEADER_URL environment variable to begin with the tls:// protocol. For example:

CRIBL_DIST_LEADER_URL=tls://<token>@logstream-<tenant>.cribl.cloud:4200

Once that’s running, the UI displays on http://localhost:9420/

The -v /var/run/appscope:/var/run/appscope \ line exposes the Unix domain socket for the AppScope Source so that it’s accessible to the scope application on the host, and in other containers that mount that same directory. See Running AppScope With Cribl Edge in a Docker Container in the AppScope documentation.

You can now start configuring Cribl Edge with Sources and Destinations, or start creating Routes and Pipelines.

Overriding Default Ports

Default ports can be overridden in the following configuration files:

  • Edge UI port (9420): Default definitions for host, port, and other settings are set in $CRIBL_HOME/default/cribl/cribl.yml, and can be overridden by defining alternatives in $CRIBL_HOME/local/cribl/cribl.yml.

  • Data Ports, for example HTTP In (10080), TCPJSON in (10420) have default definitions for host, port and other settings defined in $CRIBL_HOME/default/cribl/inputs.yml, and can be overridden by defining alternatives in $CRIBL_HOME/local/cribl/inputs.yml.

In the case of an API port conflict, the process will retry binding for 10 minutes before exiting.

Updating the Docker Image and the Packaged OS

For details, see the following topics:

Troubleshooting

When you deploy containers via Kubernetes in managed-edge mode, this Node will – after applying the first config bundle from the Leader – listen on the Fleet’s configured API Server Settings > Host.

If you encounter spurious health-check failures, change that Host setting to 0.0.0.0 (rather than the default 127.0.0.1, which can block health checks).

Cribl University offers a course titled How to Install & Configure Edge Using Docker that illustrates the installation steps. To follow the direct course link, first log into your Cribl University account. (To create an account, select the Sign up link. You’ll need to click through a short Terms & Conditions presentation, with chill music, before proceeding to courses – but Cribl’s training is always free of charge.) Once logged in, check out other useful Cribl Edge courses.