{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/942","labels_url":"https://api.github.com/repos/docker/compose/issues/942/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/942/comments","events_url":"https://api.github.com/repos/docker/compose/issues/942/events","html_url":"https://github.com/docker/compose/issues/942","id":57239100,"number":942,"title":"Data Only Containers/No Run Containers","user":{"login":"kojiromike","id":1566303,"avatar_url":"https://avatars.githubusercontent.com/u/1566303?v=3","gravatar_id":"","url":"https://api.github.com/users/kojiromike","html_url":"https://github.com/kojiromike","followers_url":"https://api.github.com/users/kojiromike/followers","following_url":"https://api.github.com/users/kojiromike/following{/other_user}","gists_url":"https://api.github.com/users/kojiromike/gists{/gist_id}","starred_url":"https://api.github.com/users/kojiromike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kojiromike/subscriptions","organizations_url":"https://api.github.com/users/kojiromike/orgs","repos_url":"https://api.github.com/users/kojiromike/repos","events_url":"https://api.github.com/users/kojiromike/events{/privacy}","received_events_url":"https://api.github.com/users/kojiromike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-02-10T21:26:14Z","updated_at":"2015-03-03T10:11:14Z","closed_at":null,"body":"I propose that Compose be able to support a way to create volume containers that never run. Right now, if you want to describe a volume container in your figfile, you must expect it to run. The best you can do is\r\n\r\n```yaml\r\ndata:\r\n    image: tianon/true\r\n    volumes:\r\n        - /my/volume\r\nservice:\r\n    image: whatever\r\n    volumes_from:\r\n        - data\r\n```\r\n\r\nBut it shouldn't be necessary to run a DVC at all. In the commandline Docker client I can do:\r\n\r\n```bash\r\nc=$(docker create --entrypoint=_ -v /my/volume scratch)\r\ndocker run --rm --volumes-from=\"$c\" busybox dd if=/dev/urandom of=/my/volume/foo bs=1M count=1\r\ndocker run --rm --volumes-from=\"$c\" busybox du -hs /my/volume/foo\r\ndocker rm -v \"$c\"\r\n```\r\n\r\nIt's admittedly a little strange to have to provide an entrypoint to `scratch`, but it doesn't ever run, so it doesn't make a difference. It would be nice to be able to do this in Compose as well.\r\n\r\n```yaml\r\ndata:\r\n    image: scratch\r\n    create_only: true\r\n    volume: …\r\n```\r\n\r\nRelated:\r\n- #697 asks to be able to run a subset of containers. This is similar in that it asks not to run a container. Perhaps this provides a use case for that, but that issue still implies that the containers can be run. This proposal is to mark containers for creation, but never to run them.\r\n- #613 - Despite the similar title this is a feature request with significantly different implications."},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/76918990","html_url":"https://github.com/docker/compose/issues/942#issuecomment-76918990","issue_url":"https://api.github.com/repos/docker/compose/issues/942","id":76918990,"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},"created_at":"2015-03-03T10:11:14Z","updated_at":"2015-03-03T10:11:14Z","body":"If Compose isn't starting `volumes_from` dependencies, that seems like an accidental feature - we should make sure that's the behaviour we want and test/document it.\r\n\r\n@MrMMorris: if the data-only container has `echo` as its command, what's wrong with restarting it?"}}