{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/1416","labels_url":"https://api.github.com/repos/docker/compose/issues/1416/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/1416/comments","events_url":"https://api.github.com/repos/docker/compose/issues/1416/events","html_url":"https://github.com/docker/compose/issues/1416","id":76771465,"number":1416,"title":"Uppercase letters in service names result in Docker API errors","user":{"login":"aanand","id":1062,"avatar_url":"https://avatars.githubusercontent.com/u/1062?v=3","gravatar_id":"","url":"https://api.github.com/users/aanand","html_url":"https://github.com/aanand","followers_url":"https://api.github.com/users/aanand/followers","following_url":"https://api.github.com/users/aanand/following{/other_user}","gists_url":"https://api.github.com/users/aanand/gists{/gist_id}","starred_url":"https://api.github.com/users/aanand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanand/subscriptions","organizations_url":"https://api.github.com/users/aanand/orgs","repos_url":"https://api.github.com/users/aanand/repos","events_url":"https://api.github.com/users/aanand/events{/privacy}","received_events_url":"https://api.github.com/users/aanand/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/area/config","name":"area/config","color":"c7def8"},{"url":"https://api.github.com/repos/docker/compose/labels/kind/bug","name":"kind/bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-15T15:59:42Z","updated_at":"2015-12-04T19:44:38Z","closed_at":null,"body":"We allow uppercase letters in service names, but Docker doesn't allow them in image names.\r\n\r\nWhen you use `build`, the name of the image we create is based on the service name. If it contains uppercase letters, Docker will refuse to create it.\r\n\r\nSome options:\r\n\r\n1. Don't allow uppercase letters in service names. Nice and strict, but backwards-incompatible.\r\n\r\n2. Do allow them, but convert to lowercase when generating an image name. This will break in the extremely unlikely scenario that two services have the same name with different case. We could check for and forbid that case if we felt like it.\r\n\r\n3.  Wait for images to be searchable by label, use labels for images (which we're going to do anyway, see #1403), and stop naming images based on the service name altogether.\r\n\r\n    But we've got to name them *something*, and it would be quite unhelpful not to incorporate the service name - right now it's nice that when I run `docker images` I can see which ones come from Compose, and what project/service they belong to."},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/162063681","html_url":"https://github.com/docker/compose/issues/1416#issuecomment-162063681","issue_url":"https://api.github.com/repos/docker/compose/issues/1416","id":162063681,"user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T19:44:37Z","updated_at":"2015-12-04T19:44:37Z","body":"> Amazing how quickly we end up inventing mini-languages.\r\n\r\nThis is a mistake commonly made by trainee falconers. Its actually a micro-format.\r\n\r\n> Worth noting: we now have the additional issue that we allow -, _ and . in service names, which can very easily make for invalid image tags. Option 1 should really say: don't allow service names which, when appended to <projectname>_, would result in an invalid image tag.\r\n\r\nI would suggest the new Compose format adopt the grammar from above. We are open to additions that are backwards compatible and reasonable. This may actually be supported.\r\n\r\nI am going to do a quick refactor of the grammar to make it more clear."}}