{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/2061","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/2061/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/2061/comments","events_url":"https://api.github.com/repos/docker/compose/issues/2061/events","html_url":"https://github.com/docker/compose/issues/2061","id":106796882,"number":2061,"title":"docker-compose run ignores the container_name directive","user":{"login":"aciobanu","id":1799487,"avatar_url":"https://avatars.githubusercontent.com/u/1799487?v=3","gravatar_id":"","url":"https://api.github.com/users/aciobanu","html_url":"https://github.com/aciobanu","followers_url":"https://api.github.com/users/aciobanu/followers","following_url":"https://api.github.com/users/aciobanu/following{/other_user}","gists_url":"https://api.github.com/users/aciobanu/gists{/gist_id}","starred_url":"https://api.github.com/users/aciobanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciobanu/subscriptions","organizations_url":"https://api.github.com/users/aciobanu/orgs","repos_url":"https://api.github.com/users/aciobanu/repos","events_url":"https://api.github.com/users/aciobanu/events{/privacy}","received_events_url":"https://api.github.com/users/aciobanu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/kind/docs","name":"kind/docs","color":"fbca04"},{"url":"https://api.github.com/repos/docker/compose/labels/kind/question","name":"kind/question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-09-16T15:23:00Z","updated_at":"2016-05-24T07:19:57Z","closed_at":null,"body":"See #1753 reported by @dunk and @aanand 's PR https://github.com/docker/compose/pull/1755 for more details.\r\n\r\nIn the #1753 issue reported, @dunk executed:\r\n\r\n    docker-compose up\r\n    docker-compose run myservice\r\n\r\nPR #1930 adds a --name param to docker-compose allowing for one off executions with a custom name\r\n\r\nSince a container with a fixed name is already running, the behavior of `docker-compose run` should be no different than that of docker-compose scale, which is basically the same thing as running docker run --name $some_name_that_already_exists.\r\n\r\nNow, when running `docker-compose up`, the container_name directive is respected; when running `docker-compose run myservice`, the container_name directive is ignored and the default auto-generated container name is used. \r\n\r\n    $ docker-compose --version\r\n    docker-compose version: 1.4.0"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/221186465","html_url":"https://github.com/docker/compose/issues/2061#issuecomment-221186465","issue_url":"https://api.github.com/repos/docker/compose/issues/2061","id":221186465,"user":{"login":"aciobanu","id":1799487,"avatar_url":"https://avatars.githubusercontent.com/u/1799487?v=3","gravatar_id":"","url":"https://api.github.com/users/aciobanu","html_url":"https://github.com/aciobanu","followers_url":"https://api.github.com/users/aciobanu/followers","following_url":"https://api.github.com/users/aciobanu/following{/other_user}","gists_url":"https://api.github.com/users/aciobanu/gists{/gist_id}","starred_url":"https://api.github.com/users/aciobanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciobanu/subscriptions","organizations_url":"https://api.github.com/users/aciobanu/orgs","repos_url":"https://api.github.com/users/aciobanu/repos","events_url":"https://api.github.com/users/aciobanu/events{/privacy}","received_events_url":"https://api.github.com/users/aciobanu/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T07:19:57Z","updated_at":"2016-05-24T07:19:57Z","body":"@galan you can run `docker-compose up service1 service2`; it will start `service1` and `service2` plus their dependencies. You can pass `--no-deps` if you don't want the dependencies started; `docker-compose help up` for a few more options.\r\n\r\nThis does solve most of the actual use cases for `run`, but I still think that `run`'s behavior is inconsistent and counter-intuitive."}}
{"actor":{"display_login":"aciobanu"}}