{"action":"created","issue":{"url":"https://api.github.com/repos/tailhook/vagga/issues/315","repository_url":"https://api.github.com/repos/tailhook/vagga","labels_url":"https://api.github.com/repos/tailhook/vagga/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/tailhook/vagga/issues/315/comments","events_url":"https://api.github.com/repos/tailhook/vagga/issues/315/events","html_url":"https://github.com/tailhook/vagga/issues/315","id":167818809,"number":315,"title":"Add clean-room mode for building containers","user":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tailhook/vagga/labels/new%20concept","name":"new concept","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-27T10:11:29Z","updated_at":"2016-07-27T10:22:10Z","closed_at":null,"body":"# Overview\r\n\r\nUnlike using `Dockerfile` we build containers with mounted `/work` directory. This means we can use anything from `/work` to determine what to use to build a container. For example `package.json` and `requirements.txt`. Also we have `!Depends` command which marks files that can influence container hash in case vagga can't determine it automatically.\r\n\r\n# Problem Statement\r\n\r\nThere is no way to check whether `!Depends` and our commands like `Copy` or `NpmDepends` (which have implicit dependency on a file) have covered everything we depend on. This is especially valuable for building deployment containers.\r\n\r\n# Solution\r\n\r\nAdd `vagga _build --clean-room container-name`. This flag is going to skip mounting `/work`. But will create an empty `/work` folder instead put all the files that build depends on implicitly or explicitly. And run normal build.\r\n\r\nI think it's good to be a flag for performance reasons. You need this just to be sure, not for daily use. \r\n\r\n# Questions\r\n\r\n1. Shouldn't the flag default to true? (maybe in some very future version)\r\n2. Shouldn't it be a flag on container config, rather than command-line?\r\n3. Maybe use some smart optimization, like hardlinking files or overlayfs or mountpoints?\r\n4. Should the flag also check if a build doesn't modify any additional files?\r\n5. Should this build be temporary, or using this container for running commands is fine too? (like for example container may depend on `ls some-dir/*` and build successfully and has the same hash, but not same contents as the one build in a normal way)\r\n\r\n/cc @popravich, @anti-social "},"comment":{"url":"https://api.github.com/repos/tailhook/vagga/issues/comments/235546646","html_url":"https://github.com/tailhook/vagga/issues/315#issuecomment-235546646","issue_url":"https://api.github.com/repos/tailhook/vagga/issues/315","id":235546646,"user":{"login":"popravich","id":323442,"avatar_url":"https://avatars.githubusercontent.com/u/323442?v=3","gravatar_id":"","url":"https://api.github.com/users/popravich","html_url":"https://github.com/popravich","followers_url":"https://api.github.com/users/popravich/followers","following_url":"https://api.github.com/users/popravich/following{/other_user}","gists_url":"https://api.github.com/users/popravich/gists{/gist_id}","starred_url":"https://api.github.com/users/popravich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popravich/subscriptions","organizations_url":"https://api.github.com/users/popravich/orgs","repos_url":"https://api.github.com/users/popravich/repos","events_url":"https://api.github.com/users/popravich/events{/privacy}","received_events_url":"https://api.github.com/users/popravich/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T10:22:10Z","updated_at":"2016-07-27T10:22:10Z","body":"So such a container (or a build) is more intended for deploy and not for running processes in it, am I right?"}}
{"actor":{"display_login":"popravich"}}