A simple container creating the Clair configuration file /etc/clair/config.yaml
from
enviroment settings on the fly and waiting for the PostgreSQL server to be up before Clair is started.
Both aspects (implemented using dockerize) come in handy when the container is used in a CI context (e.g. GitLab-CI) where mounting directories and waiting for services are not (easily) supported.
The container requires the following variables to be passed as environment settings:
POSTGRESQL_HOSTNAME
: defaults topostgres
POSTGRESQL_USERNAME
: defaults topostgres
POSTGRESQL_PORT
: defaults to5432
POSTGRESQL_WAIT
: defaults to0
(time in seconds before the script tries to start Clair)POSTGRESQL_TIMEOUT
: defaults to10
(time in seconds before dockerize gives up on PostgreSQL)PGPASSWORD
: no defaultCLAIR__UPDATE_INTERVAL
: defaults to24
(time in hours before the vulnerability metadata is updated)
Note that the setting PGPASSWORD
is not specific to this container but is a general feature of
the PostgreSQL binaries.