{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/3283","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/3283/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/3283/comments","events_url":"https://api.github.com/repos/docker/compose/issues/3283/events","html_url":"https://github.com/docker/compose/issues/3283","id":146708503,"number":3283,"title":"Duplicate runs with `docker-compose run`","user":{"login":"nathanleclaire","id":1476820,"avatar_url":"https://avatars.githubusercontent.com/u/1476820?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanleclaire","html_url":"https://github.com/nathanleclaire","followers_url":"https://api.github.com/users/nathanleclaire/followers","following_url":"https://api.github.com/users/nathanleclaire/following{/other_user}","gists_url":"https://api.github.com/users/nathanleclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanleclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanleclaire/subscriptions","organizations_url":"https://api.github.com/users/nathanleclaire/orgs","repos_url":"https://api.github.com/users/nathanleclaire/repos","events_url":"https://api.github.com/users/nathanleclaire/events{/privacy}","received_events_url":"https://api.github.com/users/nathanleclaire/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/area/run","name":"area/run","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-07T18:35:09Z","updated_at":"2016-04-09T00:25:35Z","closed_at":"2016-04-09T00:25:35Z","body":"Using: 1.7.0-rc1\r\n\r\n(Docker 1.11.0-rc3 via boot2docker)\r\n\r\nTo duplicate:\r\n\r\n```yaml\r\nversion: '2'\r\n\r\nvolumes:\r\n  myvol:\r\n    driver: local\r\n\r\nservices:\r\n  foo:\r\n    image: alpine\r\n    volumes:\r\n      - myvol:/opt/foo\r\n    command: sh -c 'echo hi from foo >>/opt/foo/out'\r\n\r\n  bar:\r\n    image: alpine\r\n    volumes:\r\n      - myvol:/opt/bar\r\n    command: sh -c 'echo hi from bar >>/opt/bar/out'\r\n\r\n  quux:\r\n    image: alpine\r\n    volumes:\r\n      - myvol:/some/arbitrary/dir\r\n    command: sh -c 'cat /some/arbitrary/dir/out'\r\n```\r\n\r\nRunning from a fairly clean daemon state (no volumes or containers):\r\n\r\n```console\r\n$ docker-compose run foo\r\nCreating volume \"demo_myvol\" with local driver\r\n$ docker-compose run bar\r\n$ docker-compose run quux\r\nhi from foo\r\nhi from bar\r\nhi from bar\r\n```\r\n\r\nSeems there was an extra `run` of `bar` that wasn't asked for.\r\n\r\nIf I clean up and try again, it seems there is an equal chance that `foo`, `bar`, or both, have been accidentally run more times than requested.\r\n\r\n```console\r\n$ docker rm -f $(docker ps -aq) && docker volume rm demo_myvol\r\n...\r\n\r\n$ docker-compose run foo && docker-compose run bar && docker-compose run quux\r\nCreating volume \"demo_myvol\" with local driver\r\nhi from foo\r\nhi from foo\r\nhi from bar\r\n\r\n$ docker rm -f $(docker ps -aq) && docker volume rm demo_myvol\r\n...\r\n\r\n$ docker-compose run foo && docker-compose run bar && docker-compose run quux\r\nCreating volume \"demo_myvol\" with local driver\r\nhi from foo\r\nhi from foo\r\nhi from bar\r\nhi from bar\r\n\r\n$ docker rm -f $(docker ps -aq) && docker volume rm demo_myvol\r\n...\r\n\r\n$ docker-compose run foo && docker-compose run bar && docker-compose run quux\r\nCreating volume \"demo_myvol\" with local driver\r\nhi from foo\r\nhi from foo\r\nhi from bar\r\nhi from bar\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/207661512","html_url":"https://github.com/docker/compose/issues/3283#issuecomment-207661512","issue_url":"https://api.github.com/repos/docker/compose/issues/3283","id":207661512,"user":{"login":"nathanleclaire","id":1476820,"avatar_url":"https://avatars.githubusercontent.com/u/1476820?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanleclaire","html_url":"https://github.com/nathanleclaire","followers_url":"https://api.github.com/users/nathanleclaire/followers","following_url":"https://api.github.com/users/nathanleclaire/following{/other_user}","gists_url":"https://api.github.com/users/nathanleclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanleclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanleclaire/subscriptions","organizations_url":"https://api.github.com/users/nathanleclaire/orgs","repos_url":"https://api.github.com/users/nathanleclaire/repos","events_url":"https://api.github.com/users/nathanleclaire/events{/privacy}","received_events_url":"https://api.github.com/users/nathanleclaire/received_events","type":"User","site_admin":false},"created_at":"2016-04-09T00:25:35Z","updated_at":"2016-04-09T00:25:35Z","body":"Welp, I'm having a hard time reproducing on a brand new VM using those RCs (Engine latest and Compose latest).  So, I guess we can close this, although it may have been due to some kind of state I had in the VM previously.  I'll let you all know if I see any similar issues, I'm also running a script to see if I can dupe again, but after a lot of iterations so far I haven't seen it again."}}