{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/2633","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/2633/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/2633/comments","events_url":"https://api.github.com/repos/docker/compose/issues/2633/events","html_url":"https://github.com/docker/compose/issues/2633","id":126064100,"number":2633,"title":"Overriding volumes from extended configurations","user":{"login":"maxcnunes","id":680356,"avatar_url":"https://avatars.githubusercontent.com/u/680356?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcnunes","html_url":"https://github.com/maxcnunes","followers_url":"https://api.github.com/users/maxcnunes/followers","following_url":"https://api.github.com/users/maxcnunes/following{/other_user}","gists_url":"https://api.github.com/users/maxcnunes/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcnunes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcnunes/subscriptions","organizations_url":"https://api.github.com/users/maxcnunes/orgs","repos_url":"https://api.github.com/users/maxcnunes/repos","events_url":"https://api.github.com/users/maxcnunes/events{/privacy}","received_events_url":"https://api.github.com/users/maxcnunes/received_events","type":"User","site_admin":false},"labels":[{"id":145946224,"url":"https://api.github.com/repos/docker/compose/labels/kind/docs","name":"kind/docs","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-01-11T23:42:25Z","updated_at":"2016-10-31T14:50:29Z","closed_at":null,"body":"Based in the example for environment variables is possible to override configurations based in the key:\n\nhttps://docs.docker.com/compose/extends/#adding-and-overriding-configuration\n\n``` bash\n# original service\nenvironment:\n  - FOO=original\n  - BAR=original\n\n# local service\nenvironment:\n  - BAR=local\n  - BAZ=local\n\n# result\nenvironment:\n  - FOO=original\n  - BAR=local\n  - BAZ=local\n```\n\nBut this same approach does not work for volumes:\n\n``` bash\n# original service\nvolumes:\n  - /tmp/foo:/tmp/original\n  - /tmp/bar:/tmp/original\n\n# local service\nvolumes:\n  - /tmp/bar:/tmp/local\n  - /tmp/baz:/tmp/local\n\n# result\nvolumes:\n  - /tmp/foo:/tmp/original\n  - /tmp/bar:/tmp/original\n  - /tmp/bar:/tmp/local\n  - /tmp/baz:/tmp/local\n```\n\n**Docker** `1.8.3`\n**Compose** `1.5.2`\n"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/257314391","html_url":"https://github.com/docker/compose/issues/2633#issuecomment-257314391","issue_url":"https://api.github.com/repos/docker/compose/issues/2633","id":257314391,"user":{"login":"dnephin","id":442180,"avatar_url":"https://avatars.githubusercontent.com/u/442180?v=3","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T14:50:29Z","updated_at":"2016-10-31T14:50:29Z","body":"I'm not sure why there would be performance issues related to volumes. I would suggest against using `volumes_from`, it's likely going to be deprecated in Compose at some point.  Using named volumes you can accomplish the same thing as a `volumes_from`, but with much more precision (you only share the volumes you want, and you can mount them at any path)."}}
{"actor":{"display_login":"dnephin"}}