clair/docs/Run.md
Quentin Machu eb7e5d5c74 main: Use configuration file instead of flags and simplify app extension.
Clair will now use a YAML configuration file instead of command line
arguments as the number of parameters grows.

Also, Clair now exposes a Boot() func that allows everyone to easily
create their own project and load dynamically their own fetchers/updaters.
2015-12-08 11:50:52 -05:00

977 B

Running Clair

Configuration

Clair makes uses of a configuration file in YAML.

Copy config.example.yaml to your choice of location, and update the values as required. The example configuration file is commented and explains every available key.

Docker

The easiest way to run Clair is with Docker.

$ docker pull quay.io/coreos/clair:latest
$ docker run -p 6060:6060 -p 6061:6061 -v <DIR_WITH_CONFIG>:/config:ro quay.io/coreos/clair:latest --config=/config/<CONFIG_FILENAME>.yaml

Initial update & API

Right after Clair starts, it will update its vulnerability database. The initial update can take quite a long time depending on the database backend in use. Clair will announce the update completion.

As soon as Clair has started, you can start querying the API to interact with it. Read the API Documentation to learn more. The contrib folder contains some tools that may help you to get started.