{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/3393","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/3393/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/3393/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/3393/events","html_url":"https://github.com/mitchellh/packer/issues/3393","id":144107957,"number":3393,"title":"docker-push pushes all images for a given repository. ","user":{"login":"ktf","id":10544,"avatar_url":"https://avatars.githubusercontent.com/u/10544?v=3","gravatar_id":"","url":"https://api.github.com/users/ktf","html_url":"https://github.com/ktf","followers_url":"https://api.github.com/users/ktf/followers","following_url":"https://api.github.com/users/ktf/following{/other_user}","gists_url":"https://api.github.com/users/ktf/gists{/gist_id}","starred_url":"https://api.github.com/users/ktf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktf/subscriptions","organizations_url":"https://api.github.com/users/ktf/orgs","repos_url":"https://api.github.com/users/ktf/repos","events_url":"https://api.github.com/users/ktf/events{/privacy}","received_events_url":"https://api.github.com/users/ktf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/builder/docker","name":"builder/docker","color":"d4c5f9"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/waiting-reply","name":"waiting-reply","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-28T23:17:09Z","updated_at":"2016-03-29T00:13:11Z","closed_at":null,"body":"I've a JSON file with the following:\r\n\r\n```\r\n 24   \"post-processors\": [\r\n 25     [\r\n 26       {\r\n 27         \"type\": \"docker-tag\",\r\n 28         \"repository\": \"{{user `project`}}/mesos-master\",\r\n 29         \"tag\": \"{{user `mesos_version`}}\"\r\n 30       },\r\n 31       \"docker-push\"\r\n 32     ]\r\n 33   ]\r\n```\r\n\r\nI would have expected that only the specified tag is pushed to the repository, however I actually see that both 0.27.2 (which is specified in the JSON) and 0.28.0 (which I specify on the command line via `-var`) are pushed."},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/202636078","html_url":"https://github.com/mitchellh/packer/issues/3393#issuecomment-202636078","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/3393","id":202636078,"user":{"login":"cbednarski","id":649798,"avatar_url":"https://avatars.githubusercontent.com/u/649798?v=3","gravatar_id":"","url":"https://api.github.com/users/cbednarski","html_url":"https://github.com/cbednarski","followers_url":"https://api.github.com/users/cbednarski/followers","following_url":"https://api.github.com/users/cbednarski/following{/other_user}","gists_url":"https://api.github.com/users/cbednarski/gists{/gist_id}","starred_url":"https://api.github.com/users/cbednarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbednarski/subscriptions","organizations_url":"https://api.github.com/users/cbednarski/orgs","repos_url":"https://api.github.com/users/cbednarski/repos","events_url":"https://api.github.com/users/cbednarski/events{/privacy}","received_events_url":"https://api.github.com/users/cbednarski/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T00:13:11Z","updated_at":"2016-03-29T00:13:11Z","body":"Thanks for the report. The identifier that packer uses to track an image through the build process is the image id (tag, push, etc.), which should uniquely identify that image even if there are multiple tags for the same repo.\r\n\r\nThat said, I don't actually have enough info to assess this. Can you post the output from `PACKER_LOG=1` and share a minimal repro of a complete config and invocation command so I can reproduce the issue? Which version of packer and docker are you using? Are you using a private registry?\r\n\r\nI think it's likely that this is caused by multiple builds having pushed multiple tags, but there's a special case in the code to handle private repos and it may be parsing the URL incorrectly."}}