{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/clair/issues/120","repository_url":"https://api.github.com/repos/coreos/clair","labels_url":"https://api.github.com/repos/coreos/clair/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/coreos/clair/issues/120/comments","events_url":"https://api.github.com/repos/coreos/clair/issues/120/events","html_url":"https://github.com/coreos/clair/issues/120","id":143393579,"number":120,"title":"how to use \"analyze-local-images\" together with docker-compose based clair instance","user":{"login":"westlifezs","id":10884856,"avatar_url":"https://avatars.githubusercontent.com/u/10884856?v=3","gravatar_id":"","url":"https://api.github.com/users/westlifezs","html_url":"https://github.com/westlifezs","followers_url":"https://api.github.com/users/westlifezs/followers","following_url":"https://api.github.com/users/westlifezs/following{/other_user}","gists_url":"https://api.github.com/users/westlifezs/gists{/gist_id}","starred_url":"https://api.github.com/users/westlifezs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westlifezs/subscriptions","organizations_url":"https://api.github.com/users/westlifezs/orgs","repos_url":"https://api.github.com/users/westlifezs/repos","events_url":"https://api.github.com/users/westlifezs/events{/privacy}","received_events_url":"https://api.github.com/users/westlifezs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coreos/clair/labels/component/contrib","name":"component/contrib","color":"0052cc"},{"url":"https://api.github.com/repos/coreos/clair/labels/kind/question","name":"kind/question","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-25T00:21:28Z","updated_at":"2016-03-25T17:12:05Z","closed_at":null,"body":"Hello,\r\n\r\nI am able to boot up a Clair instance through docker-compose based approach mentioned in the main README file. I also successfully setup  \"analyze-local-images\" tool based on the README under its own subfolder. I pull an image from our repo and I can find the image id through \"docker images\".\r\n\r\n However, when I run \"analyze-local-images IMAGE_ID\" I hit an error saying \"Could not analyze layer: Post http://127.0.0.1:6060/v1/layers: dial tcp 127.0.0.1:6060: connection refused\".\r\n\r\nIt seems like I need to explicitly open the port while spinning up the Clair instances. I found out that the port number is specified in the config file and I run the command successfully with the specified config file. But I still cannot have the instances running with that port open. Is there anything I can do to workaround this issue? \r\n\r\nthanks."},"comment":{"url":"https://api.github.com/repos/coreos/clair/issues/comments/201371465","html_url":"https://github.com/coreos/clair/issues/120#issuecomment-201371465","issue_url":"https://api.github.com/repos/coreos/clair/issues/120","id":201371465,"user":{"login":"westlifezs","id":10884856,"avatar_url":"https://avatars.githubusercontent.com/u/10884856?v=3","gravatar_id":"","url":"https://api.github.com/users/westlifezs","html_url":"https://github.com/westlifezs","followers_url":"https://api.github.com/users/westlifezs/followers","following_url":"https://api.github.com/users/westlifezs/following{/other_user}","gists_url":"https://api.github.com/users/westlifezs/gists{/gist_id}","starred_url":"https://api.github.com/users/westlifezs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westlifezs/subscriptions","organizations_url":"https://api.github.com/users/westlifezs/orgs","repos_url":"https://api.github.com/users/westlifezs/repos","events_url":"https://api.github.com/users/westlifezs/events{/privacy}","received_events_url":"https://api.github.com/users/westlifezs/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T17:12:05Z","updated_at":"2016-03-25T17:12:05Z","body":"I strictly followed the instruction under \"docker-compose\" section regarding clair setup. However, I can see the state of clair_clair is exit 1, could you please give me some suggestions? here is the running script:\r\n\r\n\r\nroot@clair-3603:~# docker-compose -f $HOME/docker-compose.yml up -d\r\nCreating network \"root_default\" with the default driver\r\nPulling postgres (postgres:latest)...\r\nlatest: Pulling from library/postgres\r\nfdd5d7827f33: Pull complete\r\na3ed95caeb02: Pull complete\r\nbeb59dc2ad34: Pull complete\r\nf42a5322ef13: Pull complete\r\nf6719ae287c6: Pull complete\r\n0dc08677d778: Pull complete\r\n5f3b03c1dd66: Pull complete\r\n4d4c6707d860: Pull complete\r\n11f8efebbb9b: Pull complete\r\nedefda034373: Pull complete\r\n5fe4bba523f0: Pull complete\r\na2d55eea3342: Pull complete\r\nDigest: sha256:bf1d7cbeb86b76f4c0991061515ebb13c6b57a9588a92f795eaebaede1c3657b\r\nStatus: Downloaded newer image for postgres:latest\r\nPulling clair (quay.io/coreos/clair:latest)...\r\nlatest: Pulling from coreos/clair\r\nfdd5d7827f33: Already exists\r\na3ed95caeb02: Pull complete\r\n0f35d0fe50cc: Pull complete\r\n7b40647e93b7: Pull complete\r\n28935209ff25: Pull complete\r\nfa005ca2f4d3: Pull complete\r\n985550cdcff5: Pull complete\r\n35ec3ef7e77d: Pull complete\r\n17ad4759012a: Pull complete\r\n63ff5a2158ad: Pull complete\r\nfc8d4d12b588: Pull complete\r\nDigest: sha256:7c34672def303d0bdf2fe7404792bf08b7002a5cd75759cd93f0eb9826e00ad3\r\nStatus: Downloaded newer image for quay.io/coreos/clair:latest\r\nCreating clair_postgres\r\nCreating clair_clair\r\nroot@clair-3603:~# netstat -anp| grep 6060\r\nroot@clair-3603:~# netstat -anp| grep 6060\r\nroot@clair-3603:~# docker-compose ps\r\n     Name                   Command               State     Ports\r\n-------------------------------------------------------------------\r\nclair_clair      clair -config /config/conf ...   Exit 1\r\nclair_postgres   /docker-entrypoint.sh postgres   Up       5432/tcp\r\nroot@clair-3603:~#"}}