{"action":"opened","issue":{"url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/41","labels_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/41/comments","events_url":"https://api.github.com/repos/bmuschko/gradle-docker-plugin/issues/41/events","html_url":"https://github.com/bmuschko/gradle-docker-plugin/issues/41","id":65442792,"number":41,"title":"Can't push tagged image created with docker-java-application to private repo","user":{"login":"david-resnick","id":488086,"avatar_url":"https://avatars.githubusercontent.com/u/488086?v=3","gravatar_id":"","url":"https://api.github.com/users/david-resnick","html_url":"https://github.com/david-resnick","followers_url":"https://api.github.com/users/david-resnick/followers","following_url":"https://api.github.com/users/david-resnick/following{/other_user}","gists_url":"https://api.github.com/users/david-resnick/gists{/gist_id}","starred_url":"https://api.github.com/users/david-resnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-resnick/subscriptions","organizations_url":"https://api.github.com/users/david-resnick/orgs","repos_url":"https://api.github.com/users/david-resnick/repos","events_url":"https://api.github.com/users/david-resnick/events{/privacy}","received_events_url":"https://api.github.com/users/david-resnick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-31T12:50:39Z","updated_at":"2015-03-31T12:50:39Z","closed_at":null,"body":"This configuration \r\n```\r\ndocker {\r\n\tjavaApplication {\r\n\t\ttag = 'private-registry.company.com:5000/namespace/project:latest'\r\n\t}\r\n}\r\n```\r\nfails with this outcome:\r\n```\r\n...\r\n:dockerPushImage\r\nPushing image with name 'private-registry.company.com:5000/namespace/project:latest'.\r\n:dockerPushImage FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n\r\n* What went wrong:\r\nExecution failed for task ':dockerPushImage'.\r\n> Invalid repository name (facts-repo:latest), only [a-z0-9-_.] are allowed\r\n```\r\n\r\nThis can be fixed by overriding the dockerPushImage convention defaults:\r\n\r\n```\r\ndockerPushImage.imageName = 'private-registry.company.com:5000/namespace/project'\r\ndockerPushImage.tag = 'latest'\r\n```\r\n\r\nThe real problem here is the confusing way docker chose to have images named, tagged and pushed. Sometimes a tag is just a tag, while other times it includes the registry, namespace and \"repository\"."}}