main: pgsql: no database connection string specified
Hi! I'm working with Docker version 1.13.0, quay.io/coreos/clair:v2.0.0-pre.3 (because I want to be able to scan images and Alpine as the base), and postgres:latest. I followed all the instructions and set the clair's database to source: postgresql://postgres:password@postgres:5432?sslmode=disable. When use docker-compose to start postgres and clair, clair won't start up right and the database doesn't have any relations.
clair_clair log:
docker logs clair_clair
2017-02-09 21:07:32.638558 C | main: pgsql: no database connection string specified
When I try to list the tables, there's nothing:
postgres=# \dt
No relations found.
What am I missing? Thanks!
Can you try downloading this example config and changing the options to your local database and see if that works?
Oh wow, that did work! I changed localhost to postures, password=password, and it worked like a charm. Thanks so much.
2017-02-13 12:51:08.419986 I | updater/fetchers/ubuntu: fetching Ubuntu vulnerabilities
2017-02-13 12:51:08.420449 I | updater/fetchers/debian: fetching Debian vulnerabilities
2017-02-13 12:51:08.420788 I | updater/fetchers/oracle: fetching Oracle Linux vulnerabilities
2017-02-13 12:51:08.421492 I | updater/fetchers/alpine: fetching Alpine vulnerabilities
2017-02-13 12:51:08.423361 I | updater/fetchers/rhel: fetching Red Hat vulnerabilities
Glad to help! The key/value pairs are easier to get the connection options correct.
@mytunguyen Hello. Can you explain about it? I tried with "host=IP_OF_PSQL port=5432 user=postgres password=**** dbname=clair sslmode=disable", but it didn't run. Thank you.