{"action":"created","issue":{"url":"https://api.github.com/repos/projectatomic/atomicapp/issues/248","labels_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/248/comments","events_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/248/events","html_url":"https://github.com/projectatomic/atomicapp/issues/248","id":103790828,"number":248,"title":"atomicapp always tries to pull images - even if they are already local","user":{"login":"dustymabe","id":4530030,"avatar_url":"https://avatars.githubusercontent.com/u/4530030?v=3","gravatar_id":"","url":"https://api.github.com/users/dustymabe","html_url":"https://github.com/dustymabe","followers_url":"https://api.github.com/users/dustymabe/followers","following_url":"https://api.github.com/users/dustymabe/following{/other_user}","gists_url":"https://api.github.com/users/dustymabe/gists{/gist_id}","starred_url":"https://api.github.com/users/dustymabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustymabe/subscriptions","organizations_url":"https://api.github.com/users/dustymabe/orgs","repos_url":"https://api.github.com/users/dustymabe/repos","events_url":"https://api.github.com/users/dustymabe/events{/privacy}","received_events_url":"https://api.github.com/users/dustymabe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/projectatomic/atomicapp/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/projectatomic/atomicapp/labels/component:core","name":"component:core","color":"bfdadc"},{"url":"https://api.github.com/repos/projectatomic/atomicapp/labels/component:provider","name":"component:provider","color":"bfdadc"},{"url":"https://api.github.com/repos/projectatomic/atomicapp/labels/component:usability","name":"component:usability","color":"bfdadc"},{"url":"https://api.github.com/repos/projectatomic/atomicapp/labels/prio:high","name":"prio:high","color":"fad8c7"},{"url":"https://api.github.com/repos/projectatomic/atomicapp/labels/prio:low","name":"prio:low","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"rtnpro","id":231684,"avatar_url":"https://avatars.githubusercontent.com/u/231684?v=3","gravatar_id":"","url":"https://api.github.com/users/rtnpro","html_url":"https://github.com/rtnpro","followers_url":"https://api.github.com/users/rtnpro/followers","following_url":"https://api.github.com/users/rtnpro/following{/other_user}","gists_url":"https://api.github.com/users/rtnpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rtnpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtnpro/subscriptions","organizations_url":"https://api.github.com/users/rtnpro/orgs","repos_url":"https://api.github.com/users/rtnpro/repos","events_url":"https://api.github.com/users/rtnpro/events{/privacy}","received_events_url":"https://api.github.com/users/rtnpro/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/projectatomic/atomicapp/milestones/7","html_url":"https://github.com/projectatomic/atomicapp/milestones/CDK%202%20beta-3","labels_url":"https://api.github.com/repos/projectatomic/atomicapp/milestones/7/labels","id":1222176,"number":7,"title":"CDK 2 beta-3","description":"","creator":{"login":"aweiteka","id":1764461,"avatar_url":"https://avatars.githubusercontent.com/u/1764461?v=3","gravatar_id":"","url":"https://api.github.com/users/aweiteka","html_url":"https://github.com/aweiteka","followers_url":"https://api.github.com/users/aweiteka/followers","following_url":"https://api.github.com/users/aweiteka/following{/other_user}","gists_url":"https://api.github.com/users/aweiteka/gists{/gist_id}","starred_url":"https://api.github.com/users/aweiteka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aweiteka/subscriptions","organizations_url":"https://api.github.com/users/aweiteka/orgs","repos_url":"https://api.github.com/users/aweiteka/repos","events_url":"https://api.github.com/users/aweiteka/events{/privacy}","received_events_url":"https://api.github.com/users/aweiteka/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":28,"state":"open","created_at":"2015-07-23T14:25:10Z","updated_at":"2015-10-20T03:50:51Z","due_on":"2015-10-20T22:00:00Z","closed_at":null},"comments":4,"created_at":"2015-08-28T20:30:12Z","updated_at":"2015-10-20T11:54:42Z","closed_at":null,"body":"In `nulecule_base.py` we check to see if an image is local using `docker images -q $name`. If an image is returned then no attempt is made to pull the image from a registry. Unfortunately unless the name of the image that we pass in is the full name (including registry) of the image then `docker images -q` returns nothing and we will always attempt to download the new image.\r\n\r\nIn the following case I already had the `projectatomic/mariadb-centos7-atomicapp` image downloaded:\r\n\r\n```\r\n[root@f22 rpm]$ docker images  | grep mariadb-centos7-atomicapp\r\ndocker.io/projectatomic/mariadb-centos7-atomicapp   latest              2b8075b4600e        4 hours ago         246.2 MB\r\n```\r\n\r\nBut atomicapp still tried to download it again. Output snipped:\r\n\r\n```\r\n2015-08-28 18:36:33,344 - atomicapp.nulecule_base - DEBUG - Output of docker images cmd: \r\n2015-08-28 18:36:33,344 - atomicapp.utils - INFO - atomicapp.status.info.message=Pulling image projectatomic/mariadb-centos7-atomicapp ...\r\nTrying to pull repository docker.io/projectatomic/mariadb-centos7-atomicapp ...\r\n```\r\n\r\nWe need to find a way to translate the shortname into a full name and pass that full name into `docker images -q` \r\n"},"comment":{"url":"https://api.github.com/repos/projectatomic/atomicapp/issues/comments/149539398","html_url":"https://github.com/projectatomic/atomicapp/issues/248#issuecomment-149539398","issue_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/248","id":149539398,"user":{"login":"rtnpro","id":231684,"avatar_url":"https://avatars.githubusercontent.com/u/231684?v=3","gravatar_id":"","url":"https://api.github.com/users/rtnpro","html_url":"https://github.com/rtnpro","followers_url":"https://api.github.com/users/rtnpro/followers","following_url":"https://api.github.com/users/rtnpro/following{/other_user}","gists_url":"https://api.github.com/users/rtnpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rtnpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtnpro/subscriptions","organizations_url":"https://api.github.com/users/rtnpro/orgs","repos_url":"https://api.github.com/users/rtnpro/repos","events_url":"https://api.github.com/users/rtnpro/events{/privacy}","received_events_url":"https://api.github.com/users/rtnpro/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T11:54:42Z","updated_at":"2015-10-20T11:54:42Z","body":"@dustymabe can you close this?"}}